Leaflet Mouse Position Control

1,076 views
Skip to first unread message

Ardhi Lukianto

unread,
Nov 30, 2012, 7:13:25 AM11/30/12
to leafl...@googlegroups.com
Hi, today is the 4th day of my "Leaflet Adventure", I was looking for a simple mouse position control but couldn't find any of it so I began to write one: Leaflet.MousePosition (https://github.com/ardhi/Leaflet.MousePosition). Hope you guys enjoy it! Peace!

Mark Winton

unread,
Mar 21, 2015, 9:43:00 AM3/21/15
to leafl...@googlegroups.com

Hi im new to Leaflet and the 

Leaflet.MousePosition control.

I have added the control to my site, but would like the positions to display as DMS with N/S E/W as per the sample picture:

Mine displays as -/+ and Lat and long are degrees decimal.
Please advise what lngFormatter , latFormatter should be if not undefined?

options: {
    position: 'bottomleft',
    separator: ' : Longitude:  ',
    emptyString: 'Unavailable',
    lngFirst: false,
    numDigits: 5,
    lngFormatter: undefined,
    latFormatter: undefined,
    prefix: "Position: Latitude: "
Reply all
Reply to author
Forward
0 new messages