[OpenLayers-Users] 900913 mismatch?
Richard Duivenvoorde
rdmailings at duif.net
Thu Oct 25 05:14:21 EDT 2007
Hi List,
I'm trying to overlay a google map with data from postgis database
(roads). On larger scale things seem to be ok, but when zoomed in at
'meters' scale, roads do not match:
http://www.duif.net/900913-mismatch.jpg
Question: has somebody experienced this? Or does somebody have an
example of perfect matching of two layers?
When I look at the multimap mercator example:
http://www.openlayers.org/dev/examples/multimap-mercator.html
zooming in at for example Amsterdam, The Netherlands, I see about the
same mismatch??
my code:
var options = {
projection: "EPSG:900913",
units: "m",
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
20037508, 20037508.34)
};
map = new OpenLayers.Map('map', options);
var layer = new OpenLayers.Layer.Google( "Google Hybrid", {type:
G_HYBRID_MAP, 'sphericalMercator': true});
map.addLayer(layer);
layer = new OpenLayers.Layer.WMS( "roads",
'http://localhost/cgi-bin/mapserv.exe?map=test.map&', {layers: 'roads',
'format':'image/gif', TRANSPARENT:true}, {'buffer': 0, isBaseLayer:
false, singleTile: true} );
Tried both reprojecting the data in postgis, using
+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0
+k=1.0 +units=m +nadgrids=@null +no_defs
OR
let mapserver reproject the data. Both give about the same shifts...
TIA
Richard Duivenvoorde
More information about the Users
mailing list