Is there built-in support or any library to export geoJSON
data from the google.maps.Data
layer or google.maps.Data.Feature
or googl
Hi i would like to share what I did to export geojson data from google maps to an html textarea.
This was my html view
This was my javascript
map.data.toGeoJson(function (data) {
document.querySelector('#geojson-input').innerHTML = JSON.stringify(data);
});
The function togeojson which is a function of map.data class, will get all data from the maps and return on object. To display that object on my textarea, I had to convert that object to a string by using JSON.stringify(data);
Hopes that will help!