Skip to content

Instantly share code, notes, and snippets.

@jgravois
Last active February 18, 2016 18:01
Show Gist options
  • Save jgravois/aa991c19c1d7372a3c9c to your computer and use it in GitHub Desktop.
Save jgravois/aa991c19c1d7372a3c9c to your computer and use it in GitHub Desktop.
raleigh open data talk
<html>
<head>
<meta charset=utf-8 />
<title>Simple FeatureLayer</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<!-- Load Leaflet from CDN-->
<link rel="stylesheet" href="//cdn.jsdelivr.net/leaflet/0.7.3/leaflet.css" />
<script src="//cdn.jsdelivr.net/leaflet/0.7.3/leaflet.js"></script>
<!-- Load Esri Leaflet from CDN -->
<!-- we encourage you to replace 'latest' with a hardcode version number (like '1.0.0-rc.7') in production applications -->
<script src="//cdn.jsdelivr.net/leaflet.esri/1.0.0-rc.8/esri-leaflet.js"></script>
<script src="http://cdn-geoweb.s3.amazonaws.com/esri-leaflet-geocoder/1.0.0-rc.4/esri-leaflet-geocoder.js"></script>
<link rel="stylesheet" type="text/css" href="http://cdn-geoweb.s3.amazonaws.com/esri-leaflet-geocoder/1.0.0-rc.4/esri-leaflet-geocoder.css">
<style>
body { margin:0; padding:0; }
#map { position: absolute; top:0; bottom:0; right:0; left:0; }
</style>
</head>
<body>
<div id="map"></div>
<script>
var map = L.map('map').setView([35.818, -78.64], 9);
L.esri.basemapLayer('Gray').addTo(map);
L.esri.featureLayer('http://services.arcgis.com/uCXeTVveQzP4IIcx/arcgis/rest/services/wakeparks1milewalk/FeatureServer/0/').addTo(map);
var searchControl = new L.esri.Geocoding.Controls.Geosearch().addTo(map);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment