[OpenLayers-Users] Mercator projected Images coordinate problem with layer

kapuch kapusta.marcin at gmail.com
Wed Jul 6 07:06:02 EDT 2011


Hello OpenLayers Users

I'm new user of OpenLayers.

I wrote a layer that get the images from mapserver by copying WMS layer and
modyfing for my needs.

This map server expect such parameters:
xRes=256&yRes=256&latTopLeft=180&lonTopLeft=-180&latBottomRight=-180&lonBottomRight=180

The result is Image in png format in Mercator projection. I think the
Mercator is problem here because when I switch the server to return
''Geographic Projection" then the coordinate system is correct. When server
return 'Mercator' images then coordinte system is corrupt and during panning
there are some unexpected movement. Also the real cities are placed on
diffrent coordinates. I think because the OpenLayer map sends to server
wrong coordiates for this projection.

In attached my layer class:

http://osgeo-org.1803224.n2.nabble.com/file/n6553981/MapCenter.js
MapCenter.js 

I'm creating Map with:

map = new OpenLayers.Map('map', 
{
   projection: 'EPSG:4326'
});

I want the coordinate system working correct for mercator images not for
"Geographic Projection" images from server. What should I do? If somebody
can analyze this short code of the layer and give some advice It could be
great.

This is what server return when the 'Mercator' projection in set: (The
coordinates, panning, zooming are incorrect)
http://osgeo-org.1803224.n2.nabble.com/file/n6553981/mapa-mercator.jpg 

And this is what server return when I set "Geographic Projection": (The
coordinates, panning, zooming are correct)
http://osgeo-org.1803224.n2.nabble.com/file/n6553981/mapa-geographic-projection.jpg 

What can I do to use "Mercator" projection on the server and have coordinate
system, panning and zooming correct. Can anybody can help?





-----
eDojazd.pl 
Niższe koszty dojazdów dla wszystkich i wszędzie!
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Mercator-projected-Images-coordinate-problem-with-layer-tp6553981p6553981.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list