<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=265374718-02032010>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=265374718-02032010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=265374718-02032010>i use this code to be able to pass a different
projection code to the getFullRequestString of the Layer.WMS.
</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=265374718-02032010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=265374718-02032010>If in the options for the
Layer.WMS projection is set, then it will be used instead of the
map.projection.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=265374718-02032010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2>OpenLayers.Layer.WMS.prototype.getFullRequestString =
function(newParams,altUrl)<BR>{<BR>
try{<BR> var projectionCode=typeof
this.options.projection == 'undefined' ? this.map.getProjection() :
this.options.projection;<BR>
}catch(err){<BR> var
projectionCode=this.map.getProjection();<BR>
}<BR> this.params.SRS = projectionCode=="none" ? null :
projectionCode;</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>
return
OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);<BR>}</FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV>
<DIV><SPAN class=265374718-02032010></SPAN><FONT face=Arial><FONT
color=#0000ff><FONT size=2>Arnd</FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=265374718-02032010></SPAN></FONT></FONT></FONT><BR> </DIV>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> users-bounces@openlayers.org
[mailto:users-bounces@openlayers.org] <B>Im Auftrag von </B>Philipp
Gaertner<BR><B>Gesendet:</B> Dienstag, 2. März 2010 03:05<BR><B>An:</B>
users@openlayers.org<BR><B>Betreff:</B> [OpenLayers-Users] WMS from ArcGIS
Server on top of google maps -Parameter 'srs' contains unacceptable
value.<BR></FONT><BR></DIV>
<DIV></DIV>Hi list,
<DIV><BR></DIV>
<DIV>I have a layer of the states and territories of Australia and would like to
overlay it on google maps using openlayers. </DIV>
<DIV><BR></DIV>
<DIV>The Australia layer is a WMS which is on my ArcGIS Server. I use
EPSG:102113 which represents in the ESRI world the WGS_1984_Web_Mercator.</DIV>
<DIV><BR></DIV>
<DIV>The WMS has following capabilities:</DIV>
<DIV><BR></DIV>
<DIV>
<DIV><FONT class=Apple-style-span color=#333399><Layer
queryable="1"></FONT></DIV>
<DIV><FONT class=Apple-style-span
color=#333399><Name>0</Name></FONT></DIV>
<DIV><FONT class=Apple-style-span
color=#333399><Title>StateBoundaries_1</Title></FONT></DIV>
<DIV><FONT class=Apple-style-span
color=#333399><Abstract>StateBoundaries_1</Abstract></FONT></DIV>
<DIV><FONT class=Apple-style-span
color=#333399><CRS>CRS:84</CRS></FONT></DIV>
<DIV><FONT class=Apple-style-span
color=#333399><CRS>EPSG:4326</CRS></FONT></DIV>
<DIV><FONT class=Apple-style-span color=#333399><CRS>EPSG:</FONT><B><FONT
class=Apple-style-span color=#333399>102113</FONT></B><FONT
class=Apple-style-span color=#333399></CRS></FONT></DIV>
<DIV><FONT class=Apple-style-span color=#333399>−</FONT></DIV>
<DIV><FONT class=Apple-style-span
color=#333399><EX_GeographicBoundingBox></FONT></DIV>
<DIV><FONT class=Apple-style-span
color=#333399><westBoundLongitude>0.000870</westBoundLongitude></FONT></DIV>
<DIV><FONT class=Apple-style-span
color=#333399><eastBoundLongitude>0.001429</eastBoundLongitude></FONT></DIV>
<DIV><FONT class=Apple-style-span
color=#333399><southBoundLatitude>-0.000393</southBoundLatitude></FONT></DIV>
<DIV><FONT class=Apple-style-span
color=#333399><northBoundLatitude>-0.000082</northBoundLatitude></FONT></DIV>
<DIV><FONT class=Apple-style-span
color=#333399></EX_GeographicBoundingBox></FONT></DIV>
<DIV><FONT class=Apple-style-span color=#333399><BoundingBox CRS="CRS:84"
minx="0.000870" miny="-0.000393" maxx="0.001429"
maxy="-0.000082"/></FONT></DIV>
<DIV><FONT class=Apple-style-span color=#333399><BoundingBox CRS="EPSG:4326"
minx="-0.000393" miny="0.000870" maxx="-0.000082"
maxy="0.001429"/></FONT></DIV>
<DIV><FONT class=Apple-style-span color=#333399><BoundingBox
CRS="<B>EPSG:102113</B>" minx="96.816766" miny="-43.740510" maxx="159.109219"
maxy="-9.142176"/></FONT></DIV>
<DIV><BR></DIV>
<DIV>the openlayer setup looks like this </DIV>
<DIV><BR></DIV>
<DIV>
<DIV><FONT class=Apple-style-span color=#990000>var geographic = new
OpenLayers.Projection("EPSG:4326");</FONT></DIV>
<DIV><FONT class=Apple-style-span color=#990000>var mercator = new
OpenLayers.Projection("EPSG:900913"); //aka EPSG:3785</FONT></DIV>
<DIV><FONT class=Apple-style-span color=#990000>var gda94 = new
OpenLayers.Projection("EPSG:4283");</FONT></DIV>
<DIV><FONT class=Apple-style-span color=#990000><BR></FONT></DIV>
<DIV><FONT class=Apple-style-span color=#990000>var world = new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34)</FONT></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"><FONT
class=Apple-style-span color=#990000></FONT></SPAN></DIV>
<DIV><FONT class=Apple-style-span color=#990000>var mapOptions = {</FONT></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"><FONT
class=Apple-style-span color=#990000></FONT></SPAN><FONT class=Apple-style-span
color=#990000>projection: mercator,</FONT></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"><FONT
class=Apple-style-span color=#990000></FONT></SPAN><FONT class=Apple-style-span
color=#990000>displayProjection: geographic, //for Mouse Position</FONT></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"><FONT
class=Apple-style-span color=#990000></FONT></SPAN><FONT class=Apple-style-span
color=#990000>maxExtent: world,</FONT></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"><FONT
class=Apple-style-span color=#990000></FONT></SPAN><FONT class=Apple-style-span
color=#990000>restrictedExtent: world,</FONT></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"><FONT
class=Apple-style-span color=#990000></FONT></SPAN><FONT class=Apple-style-span
color=#990000>units: 'm',</FONT></DIV>
<DIV><FONT class=Apple-style-span color=#990000>
</FONT><FONT class=Apple-style-span color=#990000>numZoomLevels:
22,</FONT></DIV>
<DIV><FONT class=Apple-style-span color=#990000>
</FONT><FONT class=Apple-style-span color=#990000>maxResolution:
156543.0339,</FONT></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"><FONT
class=Apple-style-span color=#990000></FONT></SPAN><FONT class=Apple-style-span
color=#990000>controls: [new OpenLayers.Control.PanZoomBar(),</FONT></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"><FONT
class=Apple-style-span color=#990000></FONT></SPAN><FONT class=Apple-style-span
color=#990000>new OpenLayers.Control.KeyboardDefaults()]</FONT><SPAN
class=Apple-tab-span style="WHITE-SPACE: pre"><FONT class=Apple-style-span
color=#990000> </FONT></SPAN></DIV>
<DIV><FONT class=Apple-style-span color=#990000>};</FONT></DIV>
<DIV><FONT class=Apple-style-span color=#990000><BR></FONT></DIV>
<DIV><FONT class=Apple-style-span color=#990000>var map = new OpenLayers.Map(
'map', mapOptions );</FONT></DIV>
<DIV><FONT class=Apple-style-span color=#990000><BR></FONT></DIV>
<DIV><FONT class=Apple-style-span color=#990000>
<DIV>//Google Physical</DIV>
<DIV>var gphy = new OpenLayers.Layer.Google("Google Physical",</DIV>
<DIV> {type:
G_PHYSICAL_MAP,</DIV>
<DIV><SPAN class=Apple-tab-span
style="WHITE-SPACE: pre"></SPAN>sphericalMercator: true,<SPAN
class=Apple-tab-span style="WHITE-SPACE: pre"> </SPAN> </DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>isBaseLayer:
true,</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>numZoomLevels:
22,</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>maxExtent: new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34)</DIV>
<DIV>});</DIV>
<DIV>map.addLayer(gphy); </DIV>
<DIV><BR></DIV>
<DIV>
<DIV>var boundaries = new OpenLayers.Layer.WMS( "Boundaries",<SPAN
class=Apple-tab-span style="WHITE-SPACE: pre"> </SPAN><SPAN class=Apple-tab-span
style="WHITE-SPACE: pre"></SPAN><SPAN class=Apple-tab-span
style="WHITE-SPACE: pre"></SPAN><SPAN class=Apple-tab-span
style="WHITE-SPACE: pre"></SPAN></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>"<A
href="http://ag-0988a/ArcGIS/services/StateBoundaries_WGS84_WM_102113/MapServer/WMSServer">http://ag-0988a/ArcGIS/services/StateBoundaries_WGS84_WM_102113/MapServer/WMSServer</A>?",</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>{layers:
'0',//srs: 'EPSG:102113',<SPAN class=Apple-tab-span style="WHITE-SPACE: pre">
</SPAN></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>format:
'image/png',</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>transparent:
true</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>},{</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>visibility:
true, </DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>isBaseLayer:
false, </DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>singleTile:
false<SPAN class=Apple-tab-span style="WHITE-SPACE: pre"> </SPAN></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>}<SPAN
class=Apple-tab-span style="WHITE-SPACE: pre"> </SPAN></DIV>
<DIV>);</DIV>
<DIV>map.addLayer(boundaries);<SPAN class=Apple-tab-span
style="WHITE-SPACE: pre"> </SPAN></DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"><BR></SPAN></DIV>
<DIV><FONT class=Apple-style-span color=#000000>The error message
is <B>Parameter 'srs' contains unacceptable value.</B></FONT></DIV>
<DIV><FONT class=Apple-style-span color=#000000><B><BR></B></FONT></DIV>
<DIV><FONT class=Apple-style-span color=#000000>I know that the google layer is
defined with EPSG:900913 and my WMS has EPSG:</FONT><FONT
class=Apple-style-span color=#000000>102113, but I can't set the EPSG
to </FONT><FONT class=Apple-style-span color=#000000>900913 because ESRI
doesn't support it. </FONT></DIV>
<DIV><FONT class=Apple-style-span color=#000000>How do I go from here, what are
my options? I need to use Google as baselayer but can reproject all WMS as I
like. </FONT></DIV>
<DIV><FONT class=Apple-style-span color=#000000><BR></FONT></DIV>
<DIV><FONT class=Apple-style-span color=#000000>Any suggestions are more than
welcome. </FONT></DIV>
<DIV><FONT class=Apple-style-span color=#000000><BR></FONT></DIV>
<DIV><FONT class=Apple-style-span color=#000000>Regards,
Philipp</FONT></DIV></DIV></FONT></DIV></DIV></DIV>
<DIV><BR></DIV></BODY></HTML>