microsoftdocs / azure-iot-docs-sdk-typescript Goto Github PK
View Code? Open in Web Editor NEWLicense: Creative Commons Attribution 4.0 International
License: Creative Commons Attribution 4.0 International
Documentation above describes 'url' as an optional property for the VectorTileSourceOptions object. However, not including the 'url' property results in the error below:
atlas.min.js?api-version=1:3388 Error: sources.usa_part_107.url: string expected, undefined found
at Object._r [as emitValidationErrors] (atlas.min.js?api-version=1:3388)
at Re (atlas.min.js?api-version=1:3388)
at r._validate (atlas.min.js?api-version=1:3388)
at r.addSource (atlas.min.js?api-version=1:3388)
at n.addSource (atlas.min.js?api-version=1:3388)
at e._addSource (atlas.min.js?api-version=1:3531)
at e.add (atlas.min.js?api-version=1:3531)
at azure-tileserver.html:40
at n (atlas.min.js?api-version=1:3513)
at n.F.fire (atlas.min.js?api-version=1:3388)
Code example generating the error is pasted below:
<!DOCTYPE html>
<html>
<head>
<title>Azure Maps Web Control Samples - Tile Layer using X, Y, and Z</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 create a simple tile layer which points to a set of tiles which use the x, y, zoom tiling system." />
<meta name="keywords" content="map, gis, API, SDK, tiles, layer, weather" />
<meta name="author" content="Microsoft Azure Maps" />
<link href="/SiteResources/azure-maps-logo-13.png" rel="shortcut icon" />
<!-- Add references to the Azure Maps Map control JavaScript and CSS files. -->
<link rel="stylesheet" href="https://atlas.microsoft.com/sdk/css/atlas.min.css?api-version=1" type="text/css" />
<script src="https://atlas.microsoft.com/sdk/js/atlas.min.js?api-version=1"></script>
<script type='text/javascript'>
var map;
var AIRMAP_API_KEY = "<API KEY - developers.airmap.com>";
function GetMap() {
//Add your Azure Maps subscription key to the map SDK. Get an Azure Maps key at https://azure.com/maps
atlas.setSubscriptionKey('Subscription Key');
//Initialize a map instance.
map = new atlas.Map('myMap', {
center: [-99.47, 40.75],
zoom: 4
});
//Wait until the map resources have fully loaded.
map.events.add('load', function (e) {
var vectorTileSource = new atlas.source.VectorTileSource('usa_part_107', {
minZoom: 6,
maxZoom: 12,
tiles: ['https://api.airmap.com/tiledata/v1/usa_part_107/controlled_airspace,laanc/{z}/{x}/{y}?apiKey=${AIRMAP_API_KEY}']
});
map.sources.add(vectorTileSource);
});
}
</script>
</head>
<body onload="GetMap()">
<div id="myMap" style="position:relative;width:800px;height:600px;"></div>
</body>
</html>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.