Code Monkey home page Code Monkey logo

azure-iot-docs-sdk-typescript's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-iot-docs-sdk-typescript's Issues

VectorTileSourceOptions 'url' property not optional

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>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.