Hi List,<br><div class="gmail_quote"><br>I&#39;m trying to put 2 baselayers in my OpenLayers web object.&nbsp; One layer is my political map of Minnesota, which has data in epsg:26915.&nbsp; The other object I want to use is a Google Maps street view layer.&nbsp; What I am having trouble doing is making them agree on the projection and having Google Maps use that projection to render it&#39;s layer.&nbsp; I thought the code below (at end of email) should work, but I am obviously missing something.<br>

<br>If I use the ol_ms layer with the map object without the gmap layer, it renders fine.&nbsp; If I use the gmap layer by itself, and define map like:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map = new OpenLayers.Map(&#39;map&#39;);<br><br>that is, same as the first one but with no configuration information, that too works fine.<br>

<br>However, putting them as base layers on the same map as laid out below doesn&#39;t work.&nbsp; When I switch to the google map, I get some gray rectangle and the standard google branding stuff at the bottom, but no real map.&nbsp; I would like it so the same bounds that were being used for the mapserver map were used.<br>

<br>I suspect it is a projection thing that I am not understanding that is in the way.&nbsp; I note that the Bounds object I use for the mapserver map has bounds like:<br><br>new OpenLayers.Bounds(184056.505,4809728.25,767381.245,5478975.75)<br>

<br>which is obviously in meters.&nbsp; But when I dump out the bounds for the working google map by itself, the 4 numbers are in latlon (-180,-90,180,90).&nbsp; I suspect it is trying to read the epsg:26915 bounds, which are in meters, as latlon bounds, and making the display with the map as some orders of magnitude large scale map that has the entire world mapped to a pixel on my screen.<br>

<br>Question: how do I make Google realize that the map is in epsg:26915 and give me its map in commensurate units?&nbsp; I thought that by defining the projection of the map with epsg:26915, that when I added the google layer to the map that it would know to project itself correctly.&nbsp; Do I have to somehow manually coerce these things, and if so, how?<br>

<br>Thanks for your time and help,<br>Matt<br>
<br><br>========================================================================<br>&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&quot;&gt;<br>&nbsp; &lt;head&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;title&gt;OpenLayers Example&lt;/title&gt;<br>
&lt;!--&nbsp;&nbsp;&nbsp; &lt;script src=&quot;<a href="http://www.openlayers.org/api/OpenLayers.js" target="_blank">http://www.openlayers.org/api/OpenLayers.js</a>&quot;&gt;&lt;/script&gt; --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;script src=&quot;<a href="http://localhost/_common//OpenLayers-2.6/OpenLayers.js" target="_blank">http://localhost/_common//OpenLayers-2.6/OpenLayers.js</a>&quot;&gt;&lt;/script&gt;<br>

&nbsp;&nbsp;&nbsp; &lt;script src=&quot;<a href="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAytPEybOjkPfSINF9aqMnSRRV_Z48x51l4m6KiJWs2Yue7BruuxS9q420SXqAbRhYk8GzmgwCugf2Fw" target="_blank">http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=ABQIAAAAytPEybOjkPfSINF9aqMnSRRV_Z48x51l4m6KiJWs2Yue7BruuxS9q420SXqAbRhYk8GzmgwCugf2Fw</a>&quot;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br>&nbsp;&nbsp;&nbsp; &lt;script type=&quot;text/javascript&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var map = null;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function init(){<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map = new OpenLayers.Map(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;map&#39;,<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxResolution: &#39;auto&#39;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , maxExtent: new OpenLayers.Bounds(184056.505,4809728.25,767381.245,5478975.75)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , units: &#39;m&#39;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , projection: &quot;EPSG:26915&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var ol_ms = new OpenLayers.Layer.MapServer(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Mapserver Untiled&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , &quot;<a href="http://localhost/cgi-bin/mapserv.exe?map=C:%5C%5Cms4w%5C%5CApache%5C%5Chtdocs%5C%5Col%5C%5Cmap.map" target="_blank">http://localhost/cgi-bin/mapserv.exe?map=C:\\ms4w\\Apache\\htdocs\\ol\\map.map</a>&quot;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , {layers: &#39;state&#39;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , {singleTile: true}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayer(ol_ms);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var gmap = new OpenLayers.Layer.Google(&quot;Google Streets&quot;);<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayer(gmap);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.zoomToMaxExtent();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.LayerSwitcher());<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &lt;/script&gt;<br>&nbsp; &lt;/head&gt;<br><br>&nbsp; &lt;body onload=&quot;init()&quot;&gt;<br>

&nbsp;&nbsp;&nbsp; &lt;div id=&quot;map&quot; class=&quot;smallmap&quot; style=&quot;width:400;height:300&quot;&gt;&lt;/div&gt;<br>&nbsp; &lt;/body&gt;<br><br>&lt;/html&gt;<br>========================================================================<br>
<font color="#888888">

</font></div><br>-- <br>It is from the wellspring of our despair and the places that we are broken that we come to repair the world.<br>-- Murray Waas