javascript - Google Maps display geoJSON from variable instead of file -
so have geojson saved in variable or parsed object:
// geojson object var segment = segment; // geojson json string var json = json.stringify(segment);
how able display on google map? it's valid , json string stored in json
visible when paste validator http://geojsonlint.com/ .
sadly, doesn't work:
mymap.data.loadgeojson(json);
and can't find other documentation google maps tells me how import geojson data directly without file.
the method load data directly geojson-object called addgeojson
you'll find description in methods-section of google.maps.data
Comments
Post a Comment