cartodb-4.42/lib/assets/javascripts/builder/helpers/point-geojson-parser.js

11 lines
206 B
JavaScript
Raw Normal View History

2024-04-06 13:25:13 +08:00
// Get coordinates from a GeoJSON
module.exports = function (geometry) {
try {
var geojson = JSON.parse(geometry);
return geojson.coordinates.join(', ');
} catch (e) {
return false;
}
};