[OpenLayers-Dev] display coordinates in another projection than map

bartvde at osgis.nl bartvde at osgis.nl
Mon Aug 25 03:39:01 EDT 2008


Thijs,

for an example see the following site:

http://tile.openstreetmap.nl/

Basically you need:
-proj4js (the projection library)
-pass a displayProjection to your MousePosition control

 map.addControl(new OpenLayers.Control.MousePosition(
    {prefix: "RD Coordinates (", separator: ",", suffix: ")",
    displayProjection: new OpenLayers.Projection("EPSG:28992"),   
numdigits:0, displayClass: "olTilePosition" }));

Best regards,
Bart

> Hallo developers,
>
> I use Open Layers (map in EPSG 90013) with OpenStreetMap (EPSG 90013) and
> layers in EPSG 28992 projection on top of
> it. The x- and y coordinates are displayed in EPSG 90013 projection (in
> the bottom right corner).
> I want te display the coordinates in EPSG 28992-coordinates (not in EPSG
> 90013 as it is now).
> How can I do this in Open Layers ?
>
> Thijs de Boer
>
>
> Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u
> niet de geadresseerde bent of dit bericht abusievelijk aan u is gezonden,
> wordt u verzocht dat aan de afzender te melden en het bericht te
> verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van
> welke aard ook, die verband houdt met risico's verbonden aan het
> elektronisch verzenden van berichten.
>
> This message may contain information that is not intended for you. If you
> are not the addressee or if this message was sent to you by mistake, you
> are requested to inform the sender and delete the message. The State
> accepts no liability for damage of any kind resulting from the risks
> inherent in the electronic transmission of messages.
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>





More information about the Dev mailing list