Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (46 sloc) 2.51 KB
<!DOCTYPE html>
<html lang="en">
<title>Satellite Imagery in OpenLayers - Azure Maps Web SDK Samples</title>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=Edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="This sample shows how to render Azure Maps Satellite/Aerial imagery tiles in the OpenLayers map control." />
<meta name="keywords" content="Microsoft maps, map, gis, API, SDK, raster, imagery, satellite, aerial, tiles, Open Layers, OpenLayers" />
<meta name="author" content="Microsoft Azure Maps" />
<!-- Add references to the Azure Maps Map control JavaScript and CSS files. -->
<link rel="stylesheet" href="" type="text/css" />
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
<script src=",Element.prototype.classList,URL"></script>
<script src=""></script>
<script type='text/javascript'>
//Add your Azure Maps subscription key to the map SDK. Get an Azure Maps key at
var subscriptionKey = '<Your Azure Maps Key>';
var map;
function GetMap() {
map = new ol.Map({
target: 'myMap',
layers: [
new ol.layer.Tile({
source: new ol.source.XYZ({
url: `{z}&x={x}&y={y}&subscription-key=${subscriptionKey}`,
attributions: ${new Date().getFullYear()} DigitalGlobe, Microsoft`
view: new ol.View({
center: [0, 0],
zoom: 2
<body onload="GetMap()">
<div id="myMap" style="position:relative;width:100%;min-width:290px;height:600px;"></div>
<fieldset style="width:calc(100% - 30px);min-width:290px;margin-top:10px;">
<legend><h1 style="font-size:16px">Satellite Imagery in OpenLayers</h1></legend>
This sample shows how to render Azure Maps Satellite/Aerial imagery tiles in the <a href="">OpenLayers map control</a>.
You can’t perform that action at this time.