Maps not showing

I’ve followed this tutorial and my map is not showing :frowning:
Developer console doesn’t show any error…

1 Like

Did you set the width and height of the div that contains the map? If that does not resolve the issue, can you please share the code?

1 Like

The most obvious reason could be defining wrong basePath. For example -
var map =‘id_of_tag_for_map’, {
key: ‘Your_API_Key’,
source: ‘vector’,
basePath: ‘/Name_of_project(main_directory)/sdk(if sdk folder is in main
}).setView([24.112349, 77.967741], 4);

  • Other reason could be height and width which you need to define.

  • Make sure script is loaded after the DOM is loaded.

  • If you can post demo code, I’ll be happy to help.:innocent:

1 Like

One thing that is not very obvious and could be causing issues is the .pbf extension. I had to add the .pbf mimetype to the web.config in order for the maps to start showing up.