Skip to content Skip to sidebar Skip to footer

Google Maps - Addgeojson Is Not Working For My File

addGeoJson is not working in google map for my file please check below code that I am using in javascript //create the map map = new google.maps.Map(document.getElementById('map-c

Solution 1:

Since Google Maps expects GeoJSON to be in EPSG:4326, Sensitive_Areas_Nitrates_Rivers.json needs to be reprojected. QGIS, for instance, could be utilized for that matter (refer docs for a details)

enter image description here

enter image description here

Reprojected Sensitive_Areas_Nitrates_Rivers.json layer will be displayed like this:

enter image description here

Solution 2:

You are getting coordinates in metres. For displaying in google map you need to convert it into [Lng, Lat].

For converting metres to [Lng, Lat] you need to change the projection from EPSG: 27700 to 4326 then only you are able to get this geojson in [Lng, Lat]

Tool you can use: QGIS Desktop 3.4.14 Link: https://qgis.org/en/site/forusers/download.html

After convert you need to export this file as feature.

Post a Comment for "Google Maps - Addgeojson Is Not Working For My File"