Last active
June 24, 2018 06:05
-
-
Save ahmadazimi/87242f5200b63f3f0f5750ca0c9c2377 to your computer and use it in GitHub Desktop.
Neshan Maps Web SDK get started guide
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link rel="stylesheet" type="text/css" href="https://static.neshan.org/api/web/v1/openlayers/v4.6.5.css"> | |
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x --> | |
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script> | |
<script type="text/javascript" src="https://static.neshan.org/api/web/v1/openlayers/v4.6.5.js?callback=initMyMap" async></script> | |
</head> | |
<body> | |
<div id="map" style="width: 600px; height: 450px; background: #eee; border: 2px solid #aaa;"></div> | |
<script type="text/javascript"> | |
function initMyMap() { | |
var myMap = new ol.Map({ | |
target: 'map', | |
key: 'YOUR_API_KEY', | |
view: new ol.View({ | |
center: ol.proj.fromLonLat([51.338076, 35.699756]), | |
zoom: 17 | |
}) | |
}); | |
myMap.setMapType('neshan'); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment