Leaflet Geolocation plotting

Hi there,

I am trying to plot my data from ERPNext on a custom leaflet web page but don’t know how to access the coordinates itself to plot.

Geojson data structure.

Leaflet code:

    $.getJSON("erpnextUrl", function(data) {
    L.geoJSON(data, {}).addTo(map);


Thank you!


$.getJSON("erpnextUrl", function(data) {

for (i in data.data) {
    var json = JSON.parse(data.data[i].geozones);

    L.geoJSON(json, {




1 Like

Hello @debee. I’m trying to do the same thing but I seem to be missing something. Can you share a repo for this project if you don’t mind @adam26d