I am in the process of creating a map for my website using the Google Maps JavaScript API. The map includes a local JSON layer that outlines a specific polygon area on the map. Everything worked perfectly when I tested it within Visual Studio, but when I tried opening map.html outside of the VisualStudio project, the polygon did not appear. What could be causing this issue?
Here is the code used to load the JSON layer:
map.data.loadGeoJson(href = "MapLayer.json");
map.data.setStyle({
fillColor: 'red'
});