Please bear with me as I am fairly new to this whole maps things
I have a geojson file with the coordinates given in the epsg:3857 format
{"name":"2011","type":"FeatureCollection"
,"crs":{"type":"name","properties":{"name":"EPSG:3857"}}
,"features":[{ "type":"Feature",
"geometry": {"type":"Polygon", "coordinates":[[[16455748.301877,-4074559.33797376],[16455757.520912,-4074683.80559603],[16455834.5041285,-4074749.65646613]]]},
"properties":{"CODE":"LGA12200","LGA_NAME":"Cootamundra (A)","STATE_CODE":"1","STATE_NAME":"New South Wales","AREA_SQKM":1523.75245790713}
}
]
}
When I import this into leaflet using L.geojson(....), the polygon is formed off the map... I know that this is because the coordinates are in the EPSG:3857..
How do I convert these to lat long coords when I import them?
There are around 100 features in the geojson file
my code to import the json file is:
$.getJSON("js/output1.json", function (data) {
// create geojson object
L.geoJson(data).addTo(map);
}