Skip to content

Instantly share code, notes, and snippets.

@hhkaos
Created March 24, 2017 12:33
Show Gist options
  • Save hhkaos/70a5bbb5c25757a8e53d1cb8d5d1956a to your computer and use it in GitHub Desktop.
Save hhkaos/70a5bbb5c25757a8e53d1cb8d5d1956a to your computer and use it in GitHub Desktop.
Esri Leaflet
<div id="map"></div>
var map = L.map('map').setView([40, -4], 6);
var layer = L.esri.Vector.basemap('Newspaper').addTo(map);
L.esri.featureLayer({
url: '//services3.arcgis.com/FrTO2wfz5ckEyZcp/arcgis/rest/services/poblacion_capitales_provincia_2014/FeatureServer/0'
}).addTo(map);
<script src="//unpkg.com/leaflet@1.0.3/dist/leaflet-src.js"></script>
<script src="//unpkg.com/esri-leaflet@2.0.8"></script>
<script src="//unpkg.com/esri-leaflet-vector"></script>
body { margin:0; padding:0; }
#map { position: absolute; top:0; bottom:0; right:0; left:0; }
<link href="//unpkg.com/leaflet@1.0.3/dist/leaflet.css" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment