Heat Map Tile Layers API Routes

API

Using Heat Map Tile Layer routes to construct Heat Map Example

//The following is example javascript code using Bing Maps Map Control API, specifying the tile source UriConstructor parameter to this route.
//The javascript src is https://www.bing.com/api/maps/mapcontrol?key=YourBingMapsKey&callback=loadMapScenario and is used in async defer mode.

<div id='heatMap' style='width: 100vw; height: 95vh;'></div>
<script type='text/javascript'>
    function loadMapScenario() {
        //Almost boilerplaite code to test the heat map tile layers. See https://www.bing.com/api/maps/sdkrelease/mapcontrol/isdk/tilelayerquadkey.
        var map = new Microsoft.Maps.Map(document.getElementById('heatMap'), {
            center: new Microsoft.Maps.Location(25, -90),
            zoom: 4,
            minZoom: 2,
            mapTypeId: Microsoft.Maps.MapTypeId.aerial
        });
        // Custom tiles for HeatMap Colors for zoom level 2-20
        var heatMapTileSource = new Microsoft.Maps.TileSource({
            uriConstructor: 'https://tileheatmapcolorlayerapi20190226024930.azurewebsites.net/api/HeatMapTileLayer/GetQuad?quadkey=0212',
            minZoom: 2,
            maxZoom: 20,
        });
        var heatMapTileLayer = new Microsoft.Maps.TileLayer({
            mercator: heatMapTileSource,
            downloadTimeout: 300000
        });
        map.layers.insert(heatMapTileLayer);
    }
</script>
<script type='text/javascript' src='https://www.bing.com/api/maps/mapcontrol?key=YourBingMapsKey&callback=loadMapScenario' async defer></script>

        

Using Heat Map Tile Count routes to verify the "hotness" of a certain quadkey or tile coordinate Example

If the GET request https://tileheatmapcolorlayerapi20190226024930.azurewebsites.net/api/HeatMapTileCount?quadkey=0212 is made, the response received would be No data available. This means that the aerial imagery tiles/quadkeys under or at that quadkey’s LOD (Level of Detail), aggregated at and from LOD 16, were visited No data available times under the current timespan the data represents.