[OpenLayers-Dev] "A square in one projection is not a square in the
other projection
Ana Henneberke
ana.henneberke at gmail.com
Fri Nov 24 11:18:39 EST 2006
Hello everyone,
I have tryid open layers against a server that used Mercator projection and
I get tiles that don't match with each other and parts of the land that are
repeated.
Here is the code I am using:
<html>
<html>
<head>
<title>Open Layers Demo Tiled</title>
<script type="text/javascript" src="lib/OpenLayers.js"></script>
</head>
<body>
<h1>Open Layers Demo Tiled</h1>
<div style="width:50%; height:50%" id="map"></div>
<script defer="defer" type="text/javascript">
var options = {'projection': 'EPSG:41001'};
var map = new OpenLayers.Map('map', options);
var wms = new OpenLayers.Layer.WMS(
"WMS", "http://localhost:8080/basicmap/wms",
{layers: 'ROADS',
REQUEST: "map"});
map.addLayer(wms);
map.zoomToMaxExtent();
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(new OpenLayers.LonLat(4,52), 7);
</script>
</body>
</html>
So I think this is because OpenLayers uses EPSG:4326 and I haven't find a
way to overcome this problem. Does someone know how to fix this?
Ana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20061124/0b644292/attachment.html
More information about the Dev
mailing list