Created
July 26, 2013 17:36
-
-
Save jgravois/6090713 to your computer and use it in GitHub Desktop.
reprojected dynamic map service layer.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Dynamic Map Services</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.3/leaflet.css" /> | |
<link rel="stylesheet" href="demo.css" /> | |
<!--[if lte IE 8]><link rel="stylesheet" href="leaflet/leaflet.ie.css" /><![endif]--> | |
<script src="http://cdn.leafletjs.com/leaflet-0.6.3/leaflet.js"></script> | |
<script src="http://gravois/leaflet/esri-leaflet.min.js"></script> | |
<script src="demo.js"></script> | |
</head> | |
<body> | |
<div id="map"> </div> | |
<div class="demo-controls"> | |
<h1 class="title contract" id="title" onclick="showControls();">Dynamic Map Service</h1> | |
<div class="control-container" id="controlContainer"> | |
<p>dynamic map services published in projections other than Web Mercator (like <a href="http://maverick.arcgis.com/ArcGIS/rest/services/GulfOfLawrence/MapServer">this one</a>), actually display quite well.</p> | |
</div> | |
</div> | |
<a href="https://github.com/esri/esri-leaflet"><img style="z-index: 1000; position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" alt="Fork me on GitHub"></a> | |
<script> | |
//Initializing the map to start at the east coast | |
var map = L.map('map').setView([45.73953, -65.70041], 7); | |
//Add Oceans Basemaps | |
L.esri.basemapLayer("Gray").addTo(map); | |
dynLayer = L.esri.dynamicMapLayer("http://maverick.arcgis.com/ArcGIS/rest/services/GulfOfLawrence/MapServer"); | |
map.addLayer(dynLayer); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment