[OpenLayers-Users] Pink broken images

Smaran Harihar smaran.harihar at gmail.com
Thu May 24 09:47:55 PDT 2012


Hi Gery,

Ok so here the issue is like this,

As u can see the Map
<https://www.dropbox.com/s/31woicfkusbs4yv/Overlay.png>is working fine
when the overlay shapefile which is
* not a basemap *(star) is overlaid onto OSM and GMaps. If you look at the
footer the co-ordinates are all wrong. *How do I get that right?* Now the
AllQuebecSpecies (star), in the
Map<https://www.dropbox.com/s/31woicfkusbs4yv/Overlay.png> is
originally EPSG:4326 which I was successfully able to reproject to
EPSG:900913 and it is working great.

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

I hope this explains better.

Thanks & Regards,
Smaran Harihar


On Thu, May 24, 2012 at 3:45 AM, Gery . <gamejihou at hotmail.com> wrote:

>  Hi Smaran,
>
> 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.
>
> Cheers,
>
> ------------------------------
> From: smaran.harihar at gmail.com
> Date: Wed, 23 May 2012 15:29:41 -0700
> Subject: Re: [OpenLayers-Users] Pink broken images
> To: gamejihou at hotmail.com; openlayers-users at lists.osgeo.org
>
>
> Hi Gery,
>
> 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.
>
> Also the new problem that I am facing is that  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).
>
> Any suggesstions?
>
> Thanks & Regards,
> Smaran Harihar
>
> On Wed, May 23, 2012 at 1:27 PM, Gery . <gamejihou at hotmail.com> wrote:
>
>  Hello,
>
> I think this link may help you about 1 and 2:
> http://gis.stackexchange.com/questions/26030/sometimes-a-white-square-dialogue-appears-in-the-middle-of-the-screen-map-data
>
> 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 <script> tag to do the conversion, or it is something about proj, not
> sure because Im writing from memory, take a look here anyway:
> http://docs.openlayers.org/library/spherical_mercator.html
>
> Hope this helps, cheers :)
>
> ------------------------------
> From: smaran.harihar at gmail.com
> Date: Wed, 23 May 2012 11:52:51 -0700
> To: openlayers-users at lists.osgeo.org
> Subject: [OpenLayers-Users] Pink broken images
>
>
> Hi,
>
> 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,
>
> 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,
>
> var geographic = new OpenLayers.Projection("EPSG:4326");
> var mercator = new OpenLayers.Projection("EPSG:900913");
>  var world = new OpenLayers.Bounds(-180, -60, 180,
> 90).transform(geographic, mercator);
> //var center = new OpenLayers.LonLat(-104.98, 39.76).transform(geographic,
> mercator);
>  var options = {
> projection : mercator,
> units : "m",
>  maxExtent : world
> };
>
> var map = new OpenLayers.Map("map-id", options);
>
> 2. Since I have added the Google Maps and I am using v3.2, there is this
> splash screen appears every time 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.
>
> 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 completely different. Why is that? Is it
> because of the spherical Mercator? How can I make it right?
>
>
> --
> Thanks & Regards
> Smaran Harihar
>
>
> _______________________________________________ Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
>
>
> --
> Thanks & Regards
> Smaran Harihar
>
>


-- 
Thanks & Regards
Smaran Harihar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120524/381d6c6f/attachment.html


More information about the Users mailing list