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

Popular posts from this blog

command line - Use qwinsta in PowerShell ISE -

java - Incorrect order of records in M-M relationship in hibernate -

php - I want to create a website for polls/survey like this http://www.poll-maker.com/ -