I would like load more than one GeoJSON file to Google Maps and style each one independently. I found the following question but have not been able to get the solution to work. interact with geojson layers independently in google maps api v3
function initMap() {
//Initialize 2 varibles that will take GeoJson files and Load the GeoJson files for each layer
var alt1row = new google.maps.Data();
alt1row.loadGeoJson('https://45d0ae3907069179bbd918ae873676bebbe0427a.googledrive.com/host/0B8EzS0XcloQzRFdPeWFIUGVLZlk/ALT_1_ROW.geojson')
var alt2row = new google.maps.Data();
alt2row.loadGeoJson('https://45d0ae3907069179bbd918ae873676bebbe0427a.googledrive.com/host/0B8EzS0XcloQzRFdPeWFIUGVLZlk/ALT_2_ROW.geojson');
//Set the style for each layer
alt1row.setStyle({
strokeColor: 'red',
strokeWeight: .5
});
alt2row.setStyle({
strokeColor: 'blue',
strokeWeight: .5
});
//Set the layers to the map
alt1row.setMap(map);
alt2row.setMap(map);
var map = new google.maps.Map(document.getElementById('map'), {
center: {lat: 35.333851, lng: -77.555105},
zoom: 10
});
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR API KEY&libraries=drawing&callback=initMap"
async defer></script>