You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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)
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
The text was updated successfully, but these errors were encountered: