Skip to content

Format not parsed correctly #13

@nickdos

Description

@nickdos

I have an example user input that does not return the expected DD output:

input coordinates: 36.01S,146.95E - this is recognised by Google geocoding API.

var parts = address.split(",");
var lat = magellan(parts[0]).latitude().toDD();
var lng = magellan(parts[1]).longitude().toDD();
console.log("magellan", parts, lat, lng);

console output:

magellan ["36.01S", "146.95E"] -3.100167 14.115833`

the following does work correctly:

magellan ["-36.01", "146.95"] -36.010000 146.950000
magellan ["36°1'S", "146°57'E"] -36.016667 146.950000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions