Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (63 sloc) 2.47 KB
<!DOCTYPE html>
<html lang="en">
<title>Multiple Maps - 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 multiple maps on the same page." />
<meta name="keywords" content="Microsoft maps, map, gis, API, SDK, multiple" />
<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" />
<script src=""></script>
<script type='text/javascript'>
var map, map2;
function GetMap() {
//Point the Azure Maps domain to the US Azure Gov Cloud domain.
//Initialize a map instance.
map = new atlas.Map('myMap', {
view: 'Auto',
//Add your Azure Maps subscription key to the map SDK. Get an Azure Maps key at
authOptions: {
authType: 'subscriptionKey',
subscriptionKey: '<Your Azure Maps Key>'
//Initialize asecond map instance.
map2 = new atlas.Map('myMap2', {
center: [-122.33, 47.6],
zoom: 12,
style: 'satellite_road_labels',
view: 'Auto',
authOptions: {
authType: 'subscriptionKey',
subscriptionKey: '<Your Azure Maps Key>'
#myMap, #myMap2 {
position: relative;
width: calc(50% - 5px);
min-width: 170px;
height: 600px;
float: left;
#myMap2 {
margin-left: 10px;
<body onload="GetMap()">
<div id="myMap"></div>
<div id="myMap2"></div>
<div style="clear:both;"></div>
<fieldset style="width:calc(100% - 30px);min-width:290px;margin-top:10px;">
<legend><h1 style="font-size:16px">Multiple Maps</h1></legend>
This sample shows how to render multiple maps on the same page.
You can’t perform that action at this time.