[OpenLayers-Users] wrong coordinates on OSM layer

Phil Scadden p.scadden at gns.cri.nz
Wed Jan 15 12:02:25 PST 2014


             function init() {
>                 map = new OpenLayers.Map('map',{
>                   'projection':new OpenLayers.Projection("EPSG:3857"),
>                   'displayProjection':new 
> OpenLayers.Projection("EPSG:32633")
>                 });
That should be
>                 map = new OpenLayers.Map('map',{
>                   projection:new OpenLayers.Projection("EPSG:3857"),
>                   displayProjection:new 
> OpenLayers.Projection("EPSG:32633")
>                 });

The hassle with js is that lack of strong typing (which is also its 
strength). If you are new to this game, get really used to using chrome 
developer tools debugger or firebug. Look at the object created and 
check that its properties are what you expect. Live in the debugger 
while you are developing.

Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.



More information about the Users mailing list