<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hi Smaran,<br><br>I see your problem, I really think it is all about the projection stuff, I didn't see you code anywhere but I can presume you're missing some transformation stuff, check this link: http://blog.sonxurxo.com/2011/04/28/tutorial-de-openlayers-ii-capas-de-google/, it was completely useful for me, although it is in spanish you will be able to understand the code and if needed, google translator is always your friend =)<br><br>I put things like WMS and WFS with the good Mapserver, I mean, using the MAP file, so I don't know how it works with Geoserver (you use that if I remember well) but I'm almost sure your problem is about projection.<br><br>Hope this helps,<br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">From: smaran.harihar@gmail.com<br>Date: Thu, 24 May 2012 09:47:55 -0700<br>Subject: Re: [OpenLayers-Users] Pink broken images<br>To: gamejihou@hotmail.com; openlayers-users@lists.osgeo.org<br><br><div>Hi Gery,</div><div><br></div>Ok so here the issue is like this,<div><br></div><div>As u can see the <a href="https://www.dropbox.com/s/31woicfkusbs4yv/Overlay.png" target="_blank">Map</a> is working fine when the overlay shapefile which is<b> not a basemap </b>(star) is overlaid onto OSM and GMaps. If you look at the footer the co-ordinates are all wrong. <b>How do I get that right?</b> Now the AllQuebecSpecies (star), in the&nbsp;<a href="https://www.dropbox.com/s/31woicfkusbs4yv/Overlay.png" target="_blank">Map</a>&nbsp;is originally EPSG:4326 which I was successfully able to reproject to EPSG:900913 and it is&nbsp;working&nbsp;great.</div>

<div><br></div><div>When I try to add a <a href="https://www.dropbox.com/s/qgpcp5q4sf9qhls/Raster.png" target="_blank">raster bio11</a>, which is basemap, it is originally EPSG:4326 and according to the <a href="http://docs.openlayers.org/library/spherical_mercator.html" target="_blank">document</a> Gery provided, it says that Geoserver has a inbuilt feature to handle the spherical&nbsp;Mercator&nbsp;and so we do not need to re-project it. <b>So I simply added the raster as a WMS along with OSM and GMaps, but as u can see in this <a href="https://www.dropbox.com/s/hmcke8kleyw42d4/Bad_Projection.png" target="_blank">OSM map image</a>, there is a lot of shift.</b> The&nbsp;<a href="https://www.dropbox.com/s/hmcke8kleyw42d4/Bad_Projection.png" target="_blank">OSM map image</a>&nbsp;was taken in the same position as the&nbsp;<a href="https://www.dropbox.com/s/qgpcp5q4sf9qhls/Raster.png" target="_blank">raster bio11</a>. Also the&nbsp;<a href="https://www.dropbox.com/s/qgpcp5q4sf9qhls/Raster.png" target="_blank">raster bio11</a>&nbsp;footer shows the right co-ordinates but when I switch to&nbsp;<a href="https://www.dropbox.com/s/hmcke8kleyw42d4/Bad_Projection.png" target="_blank">OSM map image</a>, the co-ordinates go bad. <b>Also when I add&nbsp;<a href="https://www.dropbox.com/s/qgpcp5q4sf9qhls/Raster.png" target="_blank">raster bio11</a>&nbsp;without the projection, the AllQuebecSpecies (star), which is not a basemap, also just not appear when I switch to GMaps or OSM.</b></div>

<div><br></div><div>I hope this explains better.</div><div><br></div><div>Thanks &amp; Regards,</div><div>Smaran Harihar</div><div><br><br><div class="ecxgmail_quote">On Thu, May 24, 2012 at 3:45 AM, Gery . <span dir="ltr">&lt;<a href="mailto:gamejihou@hotmail.com">gamejihou@hotmail.com</a>&gt;</span> wrote:<br>

<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">
Hi Smaran,<br><br>That's nice, uhmmm I've had I think the same problem before, but not sure about the issue itself, could you post your code to see what is going wrong? also some images to illustrate your problem.<br>

<br>Cheers,<br><div class="ecxhm ecxHOEnZb"><br></div><div><div class="ecxhm ecxHOEnZb"><div></div><hr>From: <a href="mailto:smaran.harihar@gmail.com">smaran.harihar@gmail.com</a><br>Date: Wed, 23 May 2012 15:29:41 -0700<br>

Subject: Re: [OpenLayers-Users] Pink broken images<br>To: <a href="mailto:gamejihou@hotmail.com">gamejihou@hotmail.com</a>; <a href="mailto:openlayers-users@lists.osgeo.org">openlayers-users@lists.osgeo.org</a></div>

<div><div class="h5"><br><br>Hi Gery,<div><br></div><div>Thanks for the reply, I was able to resolve some of the errors. Ok the openlayer docs said that Geoserver is compatible with EPSG:900913 so I removed any projections and it now overlays fine. But there is some shift between my WMS base layer and OSM and GMap.</div>



<div><br></div><div>Also the new problem that I am facing is that &nbsp;the lat and long that is displayed in the control is fine if I display my WMS, but if I change the basemap to OSM or GMap again the lat long goes haywire. Also the other WMS with property 'isBaseLayer': false is overlaid on my WMS basemap but not on OSM and GMaps. (Which was happening earlier).</div>



<div><br></div><div>Any suggesstions?</div><div><br></div><div>Thanks &amp; Regards,</div><div>Smaran Harihar<br><br><div>On Wed, May 23, 2012 at 1:27 PM, Gery . <span dir="ltr">&lt;<a href="mailto:gamejihou@hotmail.com">gamejihou@hotmail.com</a>&gt;</span> wrote:<br>



<blockquote style="border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">
Hello,<br><br>I think this link may help you about 1 and 2: <a href="http://gis.stackexchange.com/questions/26030/sometimes-a-white-square-dialogue-appears-in-the-middle-of-the-screen-map-data" target="_blank">http://gis.stackexchange.com/questions/26030/sometimes-a-white-square-dialogue-appears-in-the-middle-of-the-screen-map-data</a><br>



<br>I think 3 is because of the projection, google maps only works with 900913, so you have to add a line, if I remember well, almost at the end of your &lt;script&gt; tag to do the conversion, or it is something about proj, not sure because Im writing from memory, take a look here anyway: <a href="http://docs.openlayers.org/library/spherical_mercator.html" target="_blank">http://docs.openlayers.org/library/spherical_mercator.html</a><br>



<br>Hope this helps, cheers :)<br><br><div><div></div><hr>From: <a href="mailto:smaran.harihar@gmail.com">smaran.harihar@gmail.com</a><br>Date: Wed, 23 May 2012 11:52:51 -0700<br>To: <a href="mailto:openlayers-users@lists.osgeo.org">openlayers-users@lists.osgeo.org</a><br>



Subject: [OpenLayers-Users] Pink broken images<div><div><br><br><div>Hi,</div><div><br></div>I am trying to create a base map of OSM, Google Roadmap and Google Hybrid and mash it up with my own base layers in Geoserver. So these are the problems I am facing,<div>





<br></div><div>1. I have two WMS that I am mashing up, on which is BaseLayer and another one is 'isBaseLayer' : false. The one with base layer is appearing as pink tiles with broken image and the 'isBaseLayer': false is rending perfectly over OSM, GoogleMaps. Any reason y? I have changed the projections using the following code,</div>







<div><br></div><div><div>var geographic = new OpenLayers.Projection("EPSG:4326");</div><div><span style="white-space:pre-wrap">                        </span>var mercator = new OpenLayers.Projection("EPSG:900913");</div>
<div><span style="white-space:pre-wrap">                        </span>var world = new OpenLayers.Bounds(-180, -60, 180, 90).transform(geographic, mercator);</div><div><span style="white-space:pre-wrap">                        </span>//var center = new OpenLayers.LonLat(-104.98, 39.76).transform(geographic, mercator);</div>






<div><span style="white-space:pre-wrap">                        </span>var options = {</div><div><span style="white-space:pre-wrap">                                </span>projection : mercator,</div><div><span style="white-space:pre-wrap">                                </span>units : "m",</div>






<div><span style="white-space:pre-wrap">                                </span>maxExtent : world</div><div><span style="white-space:pre-wrap">                        </span>};</div><div><br></div><div><span style="white-space:pre-wrap">                        </span>var map = new OpenLayers.Map("map-id", options);</div>






</div><div><br></div><div>2. Since I have added the Google Maps and I am using v3.2, there is this splash screen appears&nbsp;every time&nbsp;the map loads or if i pan it around. How can i remove that screen? I close it by clicking on the cross and then again pan or click on the map and there it is again.</div>






<div><br></div><div>3. When I had initially added my two baselayers, the map control which got the lat and lon was giving the right co-ordinates but when I added the OSM and GMaps, the co-ordinates are&nbsp;completely&nbsp;different. Why is that? Is it because of the&nbsp;spherical&nbsp;Mercator? How can I make it right?</div>






<div><br clear="all"><div><br></div>-- <br>Thanks &amp; Regards<div>Smaran Harihar</div><br>
</div>
<br></div></div>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a></div>                                               </div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Thanks &amp; Regards<div>Smaran Harihar</div><br>
</div></div></div></div>                                               </div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Thanks &amp; Regards<div>Smaran Harihar</div><br>
</div></div>                                               </div></body>
</html>