This is an example script showing the use of leaflet.js with the Esri World Imagery tilesset.
It is intended to compliment the example found in Leaflet Tips and Tricks.
This is an example script showing the use of leaflet.js with the Esri World Imagery tilesset.
It is intended to compliment the example found in Leaflet Tips and Tricks.
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Simple Leaflet Map</title> | |
<meta charset="utf-8" /> | |
<link | |
rel="stylesheet" | |
href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" | |
/> | |
</head> | |
<body> | |
<div id="map" style="width: 600px; height: 400px"></div> | |
<script | |
src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"> | |
</script> | |
<script> | |
var map = L.map('map').setView([-41.2858, 174.78682], 14); | |
mapLink = | |
'<a href="http://www.esri.com/">Esri</a>'; | |
wholink = | |
'i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'; | |
L.tileLayer( | |
'http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', { | |
attribution: '© '+mapLink+', '+wholink, | |
maxZoom: 18, | |
}).addTo(map); | |
</script> | |
</body> | |
</html> |