Azure-docs: Azure Maps - atlas JS Error

Created on 24 May 2018  Â·  17Comments  Â·  Source: MicrosoftDocs/azure-docs

Not sure if the https://atlas.microsoft.com/sdk/js/atlas.min.js?api-version=1.0 JS or CSS Link is valid. JS throwing atlas is not defined error. Could you please check if the url is still valid.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 assigned-to-author azure-mapsvc doc-bug triaged unspecifieprod

Most helpful comment

Circling back. Azure Maps is now unblocked in India, Morocco, Pakistan and Argentina. A blog post on this will be made soon. If you have been using Azure Maps you likely would have received an email notification about this as well.

All 17 comments

@JanaAbhijit Thank you for the feedback! We are investigating this and will get back to you shortly.

@JanaAbhijit I wasn't able to get this to work on my first attempt either. It turns out that the JS and CSS links are valid (and are the same used in the quickstart, which I was successfully able to get working), but there are some additional lines needed to get this to render (highlighted in blue below):

image

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Test Map</title>

        <link rel="stylesheet" href="https://atlas.microsoft.com/sdk/css/atlas.min.css?api-version=1.0" type="text/css" />
        <script src="https://atlas.microsoft.com/sdk/js/atlas.min.js?api-version=1.0"></script>
        <style>
            html,
            body {
                width: 100%;
                height: 100%;
                padding: 0;
                margin: 0;
            }
            #map {
                width: 100%;
                height: 100%;
            }
        </style>
    </head>
    <body>
        <div id="map">
            <script>
                var MapsAccountKey = "abc123efg456hij789abc123efg456hij789";
                var map = new atlas.Map("map", {
                    "subscription-key": MapsAccountKey,
                    center: [47.59093,-122.33263],
                    zoom: 12
                });
            </script>
        </div>                
    </body>
</html>

@kgremban We should update the document to reflect this.

@kobulloc-MSFT Thank you for reverting back. However for me, problem is remain same. I took the above snippet mentioned, with updated Key. When I run it, I get a blank screen and console shows same JS undefined error - atlas. Wondering, if this is something could be related with location ?

error

@JanaAbhijit That is odd. I can confirm that it works for me (Washington, United States) in spite of an error about the location (Uncaught Error: Invalid LngLat latitude value: must be between -90 and 90). My best guess is that what you are seeing has something to do with your location. Do you mind if I ask where you are?

@kgremban Are you aware of anything that would prevent this from working in another location?

@kobulloc-MSFT - I am accessing this from India. I did a quick web availability test through Application Insights, and seems like it is working fine across all region, but I could not test it with any Asia / India specific region. But seems like it could be a specific region related issues which needs to be fixed.

@kobulloc-MSFT @kgremban - I have created a Virtual Machine in East US location and try to run the above code. It works successfully. But when I tried to run the same code from India location, It is giving me an error saying "atlas is not defined".

Could you pls create a VM in India location and try to see if it works at your end or not? Because it seems like following URLs are not accessible from India location: https://atlas.microsoft.com/sdk/css/atlas.min.css?api-version=1.0
https://atlas.microsoft.com/sdk/js/atlas.min.js?api-version=1.0

@JanaAbhijit , @vishalkhatal, @kgremban I tried this using a VM in (South) India and I can verify that I am seeing the same failures on atlas.min.css?api-version=1.0 and atlas.min.js?api-version=1.0. This appears to be an issue specific to that region.

It's a holiday weekend in the US so this may take a bit longer than usual, but we'll see if we can get some more region specific information.

@JanaAbhijit and @vishalkhatal you can always go to https://azure.microsoft.com/global-infrastructure/services/ to see where each Azure service is available. In the top left of the table, open the regions drop-down list to select India. Then you can look at the availability under Internet of Things. Currently, I see that Azure Maps is not supported in any of the India regions. You can submit product feedback to request availability in your regions.

@JanaAbhijit and @vishalkhatal

This is where you would submit product feedback requests:

https://feedback.azure.com

We'd be happy to submit this feature request on your behalf, but we'd like to give you the chance to submit directly in case you want to receive notifications, vote, or monitor progress more closely. Let us know which you would prefer.

Thanks @kobulloc-MSFT . I will submit the feedback.

@vishalkhatal Thank you! Feel free to share the link and tag me in your reply so I can vote on it.

We are going to close this thread as resolved but if there are any further questions regarding this matter, please tag me in your reply and we will be happy to continue the conversation.

Note that Azure Maps currently does not support India as documented here: https://docs.microsoft.com/en-us/azure/azure-maps/about-azure-maps#unsupported-regions The team is working to add support for geopolitically sensitive items first, such as disputed borders, before enabling support.

@rbrundritt If Azure Maps is not supported in certain countries, the map should show that message to the user. In other words this exception needs to be handled in a proper way and throw a user friendly message. Is this something in your to-do items?

The reason I ask for this change is because as a end-user, I'll be waiting for the map to load not knowing that azure maps is not supported in my area.

This isn't possible as the platform as a whole is blocked at the DNS level and nothing is sent to the client. That said, most countries will become unblocked in the near future and this won't be an issue anymore.

Is there any way to find out when any of these missing countries become available? Will it be posted in https://azure.microsoft.com/en-us/updates/?product=azure-maps?

It will most likely be posted on that site. There will also be a blog post here: https://azure.microsoft.com/en-us/blog/topics/azure-maps/ I'll also post an update to this issue.

Circling back. Azure Maps is now unblocked in India, Morocco, Pakistan and Argentina. A blog post on this will be made soon. If you have been using Azure Maps you likely would have received an email notification about this as well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

monteledwards picture monteledwards  Â·  3Comments

jamesgallagher-ie picture jamesgallagher-ie  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments

DeepPuddles picture DeepPuddles  Â·  3Comments

Ponant picture Ponant  Â·  3Comments