joepub

Using ESRI's feature server with leaflet

Discussion created by joepub on Jun 21, 2014
Latest reply on Jun 23, 2014 by joepub
Hello....

I have an ESRI feature service; Layer: Administrative boundary (0) and Tables: MEP_global_data.DBO.mep_catalog (1)

I've done lots of reading and looked at various examples but can't get the following snippet of code to work (i.e. the popup)...

The same code works for the administrative boundary(0)

Any idea what's I am missing??

Thanks
Chris

var MEP1=L.esri.featureLayer('http://dev.consciousglobalchange.org/arcgis/rest/services/MEP/webmap_catalog/FeatureServer/1', {
   style:function (feature) {
     return { color: "#70ca49", weight: 2 };
   }
   onEachFeature: createPopup
   }).addTo(map);

function createPopup(geojson,layer) {
// Show all data

Outcomes