sana.dadi123

how to use arcgis-leaflet with meteor js?

Discussion created by sana.dadi123 on Oct 24, 2016
Latest reply on Oct 24, 2016 by bill@poconogis.com

Hi everyone,

I'm making a simple app to show leaflet map with meteor and I'm using the package npm "esri-leaflet".But it doesn't work.This is my code :

Html:

<div id="viewDiv">    Explore D3 </div> </template>
javaScript:
onRendered(){  L = require('esri-leaflet')     
var map = L.map('viewDiv').setView([45.528, -122.680], 13);    
L.esri.basemapLayer("Gray").addTo(map);      var parks = L.esri.featureLayer({   
      url: "
http://gis.d3smartcity.ae/arcgis/rest/services/Operation_layers/d3_Masterplan/MapServer",     
    style: function () {             return { color: "#70ca49", weight: 2 };         }     }).addTo(map);   
   var popupTemplate = "<h3>{NAME}</h3>{ACRES} Acres<br><small>Property ID: {PROPERTYID}<small>";    
  parks.bindPopup(function (e) {         return L.Util.template(popupTemplate, e.feature.properties)     }); }

But I have always the same problem :
I'll be thankful for any help!

Outcomes