3 ms·
How can I differentiate the functions for adding {40, -70} and two parameters 40, -70? Both would be AddLatLng. I've asked the Go community about this before,
by mapmeld 12y ago
How can I differentiate the functions for adding {40, -70} and two parameters 40, -70? Both would be AddLatLng.
I've asked the Go community about this before, and the suggestion was to create a Location object with latitude and longitude. This is the type of specialized API that I am trying to avoid. A developer should be able to chuck their existing data at MapPLZ and get back a geo point.
- mutatio 12y agoUser's responsibility: mapstore.AddLatLng(ll[0], ll[1]) Or: mapstore.Add([]float64) / mapstore.AddLatLngPair([]float64) // or some variation of A lat/lon struct would also be good, removes validation of the float slice etc.