I see Google Maps support geojson. Looking at the docs here: https://developers.google.com/maps/documentation/javascript/datalayer#load_geojson
Given the last exampl
While map.data
is designed as a placeholder for the common case of a single datasource, you can have multiple, and still use addGeoJSon
using something like:
// load data - do the same for data2, data3 or whatever
data1 = new google.maps.Data();
data1.loadGeoJson(url1);
// create some layer control logic for turning on data1
data1.setMap(map) // or restyle or whatever
// turn off data1 and turn on data2
data1.setMap(null) // hides it
data2.setMap(map) // displays data2