Skip to content

Instantly share code, notes, and snippets.

@ahmadazimi
Last active February 5, 2019 15:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmadazimi/68d2120e514e08255b5758f8c9359b24 to your computer and use it in GitHub Desktop.
Save ahmadazimi/68d2120e514e08255b5758f8c9359b24 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Neshan Map Example (OpenLayers)</title>
<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/sdk/openlayers/4.6.5/ol.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/sdk/openlayers/4.6.5/ol.js"></script>
</head>
<body>
<div id="map" style="width: 600px; height: 450px; background: #eee; border: 2px solid #aaa;"></div>
<script type="text/javascript">
var myMap = new ol.Map({
target: 'map',
key: 'YOUR_API_KEY',
view: new ol.View({
center: ol.proj.fromLonLat([51.338076, 35.699756]),
zoom: 14
})
});
myMap.setMapType('dreamy');
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment