Created
December 7, 2017 02:23
-
-
Save mrcnc/dc48a0787b39e7342f3459914746235e to your computer and use it in GitHub Desktop.
a simple openlayers map displaying satellite imagery from gis.nola.gov
This file contains hidden or 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>New Orleans Satellite Imagery</title> | |
<link rel="stylesheet" href="//openlayers.org/en/latest/css/ol.css" type="text/css"> | |
<script src="//openlayers.org/en/latest/build/ol.js"></script> | |
</head> | |
<body> | |
<div id="map" class="map"></div> | |
<script> | |
var layers = [ | |
new ol.layer.Tile({ | |
extent: [-13884991, 2870341, -7455066, 6338219], | |
source: new ol.source.TileArcGISRest({ | |
url: 'http://gis.nola.gov/arcgis/rest/services/Basemaps/Aerials2016/MapServer' | |
}) | |
}) | |
]; | |
var map = new ol.Map({ | |
target: 'map', | |
layers: layers, | |
view: new ol.View({ | |
center: ol.proj.fromLonLat([-90.07, 29.95]), | |
zoom: 12 | |
}) | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment