cartodb/lib/assets/javascripts/builder/helpers/point-geojson-parser.js
2020-06-15 10:58:47 +08:00

11 lines
206 B
JavaScript
Executable File

// Get coordinates from a GeoJSON
module.exports = function (geometry) {
try {
var geojson = JSON.parse(geometry);
return geojson.coordinates.join(', ');
} catch (e) {
return false;
}
};