Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Degrees decimal minutes as return format? #9

Open
gwacker opened this issue Apr 16, 2014 · 3 comments
Open

Degrees decimal minutes as return format? #9

gwacker opened this issue Apr 16, 2014 · 3 comments

Comments

@gwacker
Copy link

gwacker commented Apr 16, 2014

New feature suggestion:

Instead of useDMS:false, what about passing in an array of one or more output formats. Multiple formats would stack in the order passed in.

{format: ['dms']} would be like useDMS:true currently returns
{format: ['ddm']} would be a new format... most GPSs use this format and probably most human readable (if you're not a programmer)
{format: ['dd']} would be like useDMS:false currently returns

{format: ['dms', 'ddm', 'dd']} would stack all three of them in the output container

degrees minutes seconds output
Lat: 40° 26′ 46″ N, Lon: 79° 58′ 56″ W
degrees decimal minutes output
Lat: 40° 26.767′ N, Lon: 79° 58.933′ W
decimal degrees output
Lat: 40.446, Lon: -79.982

@MrMufflon
Copy link
Owner

You mean display them all at once? I don´t know if I like that, but the DDM format would definetly be useful.

@gwacker
Copy link
Author

gwacker commented Apr 17, 2014

Well, an option to display more than one format depending on what is passed in with the format array. I guess my thought was it's not much extra work/code to offer the option to pass in or return more than one format.

While the vast majority would probably still pass in only a single format, I can see this combo being useful.
L.control.coordinates({
format: ['ddm', 'dd']
}).addTo(map);

A new way to pass in formats would break backwards compatibility, but it also opens things up to offer a few more formats down the road like Universal Transverse Mercator (UTM) and military grid reference system (MGRS)

Thanks for the consideration.

@s7726
Copy link

s7726 commented Jun 20, 2020

Easy enough to detect if it's passed as a value, or a list. Shouldn't break backwards compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants