<!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>Hi
Philipp,</FONT></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>the <SPAN
class=015064816-03032010>function
OpenLayers.Layer.WMS.prototype.getFullRequestString </SPAN>have to be load
after the OpenLayers script(s) are loaded <SPAN
class=015064816-03032010>(the function overwrites the original function from
OpenLayers) </SPAN>and before the declaration of the Layer.WMS.</FONT></DIV>
<DIV> </DIV><FONT face=Arial color=#0000ff size=2>
<DIV dir=ltr align=left><BR>It should be something in this way:</DIV>
<DIV> </DIV>
<DIV dir=ltr align=left>...</DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><script
src="../lib/OpenLayers.js"></script></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><script type="text/javascript"></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left>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;<BR> <BR> return
OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);<BR>}</DIV>
<DIV> </DIV>
<DIV dir=ltr align=left>function init()<BR>{</DIV>
<DIV> </DIV>
<DIV dir=ltr align=left> var boundaries = new
OpenLayers.Layer.WMS( "Boundaries",
<BR> "<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>?",<BR>
//parameter<BR> { layers:
'0', <BR>
format: 'image/png',
<BR>
transparent: true<BR>
},<BR> //options
<BR> { visibility: true,
<BR>
isBaseLayer: false,
<BR>
singleTile:
false,<BR>
projection :
'EPSG:102113'<BR>
}<BR> );</DIV>
<DIV> </DIV>
<DIV dir=ltr align=left>...<BR>}</DIV>
<DIV> </DIV>
<DIV dir=ltr align=left></script><BR></head><BR><body
onload="init()"></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left>...</DIV>
<DIV> </DIV>
<DIV dir=ltr align=left>Good Luck<BR>Arnd<BR></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> Philipp Gaertner
[mailto:gaertner.p@gmail.com] <BR><B>Gesendet:</B> Mittwoch, 3. März 2010
01:56<BR><B>An:</B> Arnd Wippermann<BR><B>Betreff:</B> Re: [OpenLayers-Users]
WMS from ArcGIS Server on top of google maps -Parameter 'srs' contains
unacceptable value.<BR></FONT><BR></DIV>
<DIV></DIV>Hi Arnd,
<DIV><BR></DIV>
<DIV>thank you for the response, unfortunately I don't know where to use or
replace your code snippet in my .js file.</DIV>
<DIV><BR></DIV>
<DIV>The WMS I work on has the following parameters.</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',</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN><FONT
class=Apple-style-span color=#ff0000>//projection: 'EPSG:102113',<SPAN
class=Apple-style-span style="COLOR: rgb(0,0,0)"><SPAN class=Apple-tab-span
style="WHITE-SPACE: pre"> </SPAN></SPAN></FONT></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><SPAN
class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN>}</DIV>
<DIV><SPAN class=Apple-tab-span style="WHITE-SPACE: pre"></SPAN></DIV>
<DIV>);</DIV>
<DIV><BR></DIV>
<DIV>I added the projection: 'EPSG:102113' but it didn't seem to change
anything. Where would go your code? Would it replace the the whole section of
var boundaries or would it be an additional part?</DIV>
<DIV><BR></DIV>
<DIV>I'm a little lost.</DIV>
<DIV><BR></DIV>
<DIV>Regards, Philipp</DIV><BR>
<DIV class=gmail_quote>On 3 March 2010 05:54, Arnd Wippermann <SPAN
dir=ltr><<A
href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>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></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>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></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></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></SPAN></FONT></FONT></FONT><BR> </DIV>
<DIV lang=de dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2><B>Von:</B> <A
href="mailto:users-bounces@openlayers.org"
target=_blank>users-bounces@openlayers.org</A> [mailto:<A
href="mailto:users-bounces@openlayers.org"
target=_blank>users-bounces@openlayers.org</A>] <B>Im Auftrag von </B>Philipp
Gaertner<BR><B>Gesendet:</B> Dienstag, 2. März 2010 03:05<BR><B>An:</B> <A
href="mailto:users@openlayers.org"
target=_blank>users@openlayers.org</A><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></DIV>
<DIV class=h5>
<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 color=#333399><Layer queryable="1"></FONT></DIV>
<DIV><FONT color=#333399><Name>0</Name></FONT></DIV>
<DIV><FONT
color=#333399><Title>StateBoundaries_1</Title></FONT></DIV>
<DIV><FONT
color=#333399><Abstract>StateBoundaries_1</Abstract></FONT></DIV>
<DIV><FONT color=#333399><CRS>CRS:84</CRS></FONT></DIV>
<DIV><FONT color=#333399><CRS>EPSG:4326</CRS></FONT></DIV>
<DIV><FONT color=#333399><CRS>EPSG:</FONT><B><FONT
color=#333399>102113</FONT></B><FONT color=#333399></CRS></FONT></DIV>
<DIV><FONT color=#333399>−</FONT></DIV>
<DIV><FONT color=#333399><EX_GeographicBoundingBox></FONT></DIV>
<DIV><FONT
color=#333399><westBoundLongitude>0.000870</westBoundLongitude></FONT></DIV>
<DIV><FONT
color=#333399><eastBoundLongitude>0.001429</eastBoundLongitude></FONT></DIV>
<DIV><FONT
color=#333399><southBoundLatitude>-0.000393</southBoundLatitude></FONT></DIV>
<DIV><FONT
color=#333399><northBoundLatitude>-0.000082</northBoundLatitude></FONT></DIV>
<DIV><FONT color=#333399></EX_GeographicBoundingBox></FONT></DIV>
<DIV><FONT color=#333399><BoundingBox CRS="CRS:84" minx="0.000870"
miny="-0.000393" maxx="0.001429" maxy="-0.000082"/></FONT></DIV>
<DIV><FONT color=#333399><BoundingBox CRS="EPSG:4326" minx="-0.000393"
miny="0.000870" maxx="-0.000082" maxy="0.001429"/></FONT></DIV>
<DIV><FONT 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 color=#990000>var geographic = new
OpenLayers.Projection("EPSG:4326");</FONT></DIV>
<DIV><FONT color=#990000>var mercator = new
OpenLayers.Projection("EPSG:900913"); //aka EPSG:3785</FONT></DIV>
<DIV><FONT color=#990000>var gda94 = new
OpenLayers.Projection("EPSG:4283");</FONT></DIV>
<DIV><FONT color=#990000><BR></FONT></DIV>
<DIV><FONT color=#990000>var world = new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34)</FONT></DIV>
<DIV><SPAN style="WHITE-SPACE: pre"><FONT color=#990000></FONT></SPAN></DIV>
<DIV><FONT color=#990000>var mapOptions = {</FONT></DIV>
<DIV><SPAN style="WHITE-SPACE: pre"><FONT color=#990000></FONT></SPAN><FONT
color=#990000>projection: mercator,</FONT></DIV>
<DIV><SPAN style="WHITE-SPACE: pre"><FONT color=#990000></FONT></SPAN><FONT
color=#990000>displayProjection: geographic, //for Mouse Position</FONT></DIV>
<DIV><SPAN style="WHITE-SPACE: pre"><FONT color=#990000></FONT></SPAN><FONT
color=#990000>maxExtent: world,</FONT></DIV>
<DIV><SPAN style="WHITE-SPACE: pre"><FONT color=#990000></FONT></SPAN><FONT
color=#990000>restrictedExtent: world,</FONT></DIV>
<DIV><SPAN style="WHITE-SPACE: pre"><FONT color=#990000></FONT></SPAN><FONT
color=#990000>units: 'm',</FONT></DIV>
<DIV><FONT color=#990000> </FONT><FONT
color=#990000>numZoomLevels: 22,</FONT></DIV>
<DIV><FONT color=#990000> </FONT><FONT
color=#990000>maxResolution: 156543.0339,</FONT></DIV>
<DIV><SPAN style="WHITE-SPACE: pre"><FONT color=#990000></FONT></SPAN><FONT
color=#990000>controls: [new OpenLayers.Control.PanZoomBar(),</FONT></DIV>
<DIV><SPAN style="WHITE-SPACE: pre"><FONT color=#990000></FONT></SPAN><FONT
color=#990000>new OpenLayers.Control.KeyboardDefaults()]</FONT><SPAN
style="WHITE-SPACE: pre"><FONT color=#990000> </FONT></SPAN></DIV>
<DIV><FONT color=#990000>};</FONT></DIV>
<DIV><FONT color=#990000><BR></FONT></DIV>
<DIV><FONT color=#990000>var map = new OpenLayers.Map( 'map', mapOptions
);</FONT></DIV>
<DIV><FONT color=#990000><BR></FONT></DIV>
<DIV><FONT color=#990000>
<DIV>//Google Physical</DIV>
<DIV>var gphy = new OpenLayers.Layer.Google("Google Physical",</DIV>
<DIV> {type:
G_PHYSICAL_MAP,</DIV>
<DIV><SPAN style="WHITE-SPACE: pre"></SPAN>sphericalMercator: true,<SPAN
style="WHITE-SPACE: pre"> </SPAN> </DIV>
<DIV><SPAN style="WHITE-SPACE: pre"></SPAN>isBaseLayer: true,</DIV>
<DIV><SPAN style="WHITE-SPACE: pre"></SPAN>numZoomLevels: 22,</DIV>
<DIV><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
style="WHITE-SPACE: pre"> </SPAN><SPAN style="WHITE-SPACE: pre"></SPAN><SPAN
style="WHITE-SPACE: pre"></SPAN><SPAN style="WHITE-SPACE: pre"></SPAN></DIV>
<DIV><SPAN style="WHITE-SPACE: pre"></SPAN>"<A
href="http://ag-0988a/ArcGIS/services/StateBoundaries_WGS84_WM_102113/MapServer/WMSServer"
target=_blank>http://ag-0988a/ArcGIS/services/StateBoundaries_WGS84_WM_102113/MapServer/WMSServer</A>?",</DIV>
<DIV><SPAN style="WHITE-SPACE: pre"></SPAN>{layers: '0',//srs:
'EPSG:102113',<SPAN style="WHITE-SPACE: pre"> </SPAN></DIV>
<DIV><SPAN style="WHITE-SPACE: pre"></SPAN>format: 'image/png',</DIV>
<DIV><SPAN style="WHITE-SPACE: pre"></SPAN>transparent: true</DIV>
<DIV><SPAN style="WHITE-SPACE: pre"></SPAN>},{</DIV>
<DIV><SPAN style="WHITE-SPACE: pre"></SPAN>visibility: true, </DIV>
<DIV><SPAN style="WHITE-SPACE: pre"></SPAN>isBaseLayer: false, </DIV>
<DIV><SPAN style="WHITE-SPACE: pre"></SPAN>singleTile: false<SPAN
style="WHITE-SPACE: pre"> </SPAN></DIV>
<DIV><SPAN style="WHITE-SPACE: pre"></SPAN>}<SPAN style="WHITE-SPACE: pre">
</SPAN></DIV>
<DIV>);</DIV>
<DIV>map.addLayer(boundaries);<SPAN style="WHITE-SPACE: pre"> </SPAN></DIV>
<DIV><SPAN style="WHITE-SPACE: pre"><BR></SPAN></DIV>
<DIV><FONT color=#000000>The error message is <B>Parameter 'srs' contains
unacceptable value.</B></FONT></DIV>
<DIV><FONT color=#000000><B><BR></B></FONT></DIV>
<DIV><FONT color=#000000>I know that the google layer is defined
with EPSG:900913 and my WMS has EPSG:</FONT><FONT
color=#000000>102113, but I can't set the EPSG to </FONT><FONT
color=#000000>900913 because ESRI doesn't support it. </FONT></DIV>
<DIV><FONT 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 color=#000000><BR></FONT></DIV>
<DIV><FONT color=#000000>Any suggestions are more than
welcome. </FONT></DIV>
<DIV><FONT color=#000000><BR></FONT></DIV>
<DIV><FONT color=#000000>Regards,
Philipp</FONT></DIV></DIV></FONT></DIV></DIV></DIV>
<DIV><BR></DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>