This is another follow-up on running Azure Maps Example.
var map = new atlas.Map('theMap', {
// Only allow one copy of the world be rendered when zoomed out.
renderWorldCopies: false,
language: 'en-US',
center: [-122.33, 47.6],
zoom: 12,
view: 'auto',
authOptions: {
authType: 'subscriptionKey',
subscriptionKey: 'myKey', // Removed for security here
getToken: function(resolve, reject, map) {
fetch(url).then(function(response) {
return response.text();
}).then(function(token) {
resolve(token);
});
}
}
});
// Wait until the map resources are ready.
map.events.add('ready', function () {
// Add your post map load code here.
map.controls.add(new atlas.control.StyleControl({
mapStyles: ['road', 'road_shaded_relief', 'satellite', 'satellite_road_labels'],
layout: 'list',
style: 'road'
}), {
position: 'top-right'
});
});
message: "Bad Request" name: "wt" stack: "" status: 400 url: "https://atlas.microsoft.com/map/tile/pbf?language=en-US&view=auto&api-version=1.0&layer=basic&style=main&zoom=12&x=2590&y=2855&subscription-key=myKey"
The map displays but map is completely blank. This error is thrown several times when launching page. Again code copied directly from example with no modifications at this time.
TIA! Rick...