[OSM-talk] map display www.openstreetmap.org

Tom Hughes tom at compton.nu
Thu Oct 9 12:53:11 BST 2008


Philip Homburg wrote:

> In your letter dated Wed, 8 Oct 2008 17:18:16 +0100 you wrote:
>> You need to set the displayProjection parameter on the control to get
>> it to give you lat/lons.
>> eg: map.addControl(new
>> OpenLayers.Control.MousePosition({displayProjection:
>> map.getProjectionObject()}));
> 
> That code doesn't seem to make a difference.

That's because displayProjection wasn't set on our map (it is now) plus 
that code is wrong because it sets the displayProjection on the control 
to the projection of the map, not it's display projection.

In fact if displayProjection is set on the map then it is automatically 
set on the control when you add it, so if you update then your original 
code will work.

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/




More information about the talk mailing list