Skip to content

Instantly share code, notes, and snippets.

@odoe
Created May 25, 2015 16:38
Show Gist options
  • Select an option

  • Save odoe/05ad9e876d4942ccbb84 to your computer and use it in GitHub Desktop.

Select an option

Save odoe/05ad9e876d4942ccbb84 to your computer and use it in GitHub Desktop.
var L = require('leaflet');
require('esri-leaflet');
var popupTemplate = require('.src/popup.js');
var node = L.DomUtil.create('div', 'map-div', document.body);
var map = L.map(node).setView([45.528, -122.680], 13);
L.esri.basemapLayer('Gray').addTo(map);
var parks = new L.esri.FeatureLayer('http://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Portland_Parks/FeatureServer/0', {
style: function () {
return { color: '#70ca49', weight: 2 };
}
}).addTo(map);
parks.bindPopup(popupTemplate);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment