Skip to content

Instantly share code, notes, and snippets.

@jkreft-usgs
Created April 12, 2016 18:35
Show Gist options
  • Save jkreft-usgs/c5c4310039d20e7f60ade2542a41a5e7 to your computer and use it in GitHub Desktop.
Save jkreft-usgs/c5c4310039d20e7f60ade2542a41a5e7 to your computer and use it in GitHub Desktop.
Leaflet Esri Hydro
<html>
<head>
<meta charset=utf-8 />
<title>Historic Topographic Maps</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<!-- Load Leaflet from CDN-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/leaflet/1.0.0-beta.2/leaflet.css" />
<script src="https://cdn.jsdelivr.net/leaflet/1.0.0-beta.2/leaflet.js"></script>
<!-- Load Esri Leaflet from CDN -->
<script src="https://cdn.jsdelivr.net/leaflet.esri/2.0.0-beta.8/esri-leaflet.js"></script>
<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([ 30.70, -81.47], 12);
L.esri.basemapLayer("Gray").addTo(map);
L.esri.tiledMapLayer({
url: "http://hydrology.esri.com/arcgis/rest/services/WorldHydroReferenceOverlay/MapServer"
}).addTo(map);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment