Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (57 sloc) 3.27 KB
<!DOCTYPE html>
<html lang="en">
<head>
<title>Raster Tiles in Cesium JS - 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 Raster Tiles in the Cesium JS map control." />
<meta name="keywords" content="Microsoft maps, map, gis, API, SDK, tiles, raster, cesium, cesium.js" />
<meta name="author" content="Microsoft Azure Maps" />
<!-- Add references to the CesiumJS Map control JavaScript and CSS files. -->
<link rel="stylesheet" href="https://cesiumjs.org/releases/1.18/Build/Cesium/Widgets/widgets.css" type="text/css" />
<script src="https://cesiumjs.org/releases/1.44/Build/Cesium/Cesium.js"></script>
<script type='text/javascript'>
var map;
function GetMap() {
map = new Cesium.Viewer('myMap', {
imageryProvider: new Cesium.UrlTemplateImageryProvider({
url: new Cesium.Resource({
url: 'https://atlas.azure.us/map/tile?api-version=2.0&zoom={z}&x={x}&y={y}&tileSize=256',
queryParameters: {
/*
Tileset ID specifies which data layers to render in the tiles. Can be:
'microsoft.base.road',
'microsoft.base.darkgrey',
'microsoft.imagery',
'microsoft.weather.infrared.main',
'microsoft.weather.radar.main',
'microsoft.base.hybrid.road',
'microsoft.base.labels.road '
*/
tilesetId: 'microsoft.base.road',
//The language of labels. Supported languages: https://docs.microsoft.com/en-us/azure/azure-maps/supported-languages
language: 'en-US',
//The regional view of the map. Supported views: https://aka.ms/AzureMapsLocalizationViews
view: 'Auto',
//Add your Azure Maps subscription key to the map SDK. Get an Azure Maps key at https://azure.com/maps
'subscription-key': '<Your Azure Maps Key>'
}
}),
credit: new Cesium.Credit(${new Date().getFullYear()} TomTom, Microsoft`, true),
maximumLevel: 18,
enablePickFeatures: false
}),
baseLayerPicker: false
});
}
</script>
</head>
<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">Raster Tiles in Cesium JS</h1></legend>
This sample shows how to render Azure Maps Raster Tiles in the <a href="https://cesiumjs.org/">Cesium JS map control</a>.
</fieldset>
</body>
</html>
You can’t perform that action at this time.