[OpenLayers-Dev] RE: Welcome to the "Dev" mailing list

Honigbaum, Torben Honigbaum.T at ampeg.de
Fri Nov 5 10:36:14 EDT 2010


Hi everybody,

I'm new to OpenLayers and have a little problem with my map.

I added a custom tile layer to my map using OpenLayers.Layer.XYZ() with following options: sphericalMercator: true und layers: 'basic'. The projection of the tiles is EPSG:900913.
Furthermore I added a vector layer using OpenLayers.Layer.Vector with format WKT. 

Now I load my vector from database (stored in EPSG:4326) and add it to my vector layer. For this I use a OpenLayers.Format.WKT() with internalProjection EPSG:900913 and externalProjection EPSG:4326. And everthing works fine. The tiles are shown correct and the overlaying vector data (boundaries of the countries) fits exactly. 

For testing I added the click event from this example: http://openlayers.org/dev/examples/click.html And now the part that I don't understand. I clicked at exactly the same point on the world map and get the following coordinates: 

Example map: 	-6.119384765625   N, 39.495849609375 E
My own map:   -684875.77331284 N, 4400326.8435333 E

So what I'm doing wrong?!

Torben


More information about the Dev mailing list