Can Azure Maps 3D buildings block objects? Can the location of an object be set with altitude?

Kent010341 231 Reputation points

I have two questions about Azure Maps.

First, in this sample, I found that some roads will be grayer if a building is in front of it. This feature is also included in Google Maps.
Is it possible to make a custom added object (e.g., marker, route line, etc.) be grayer or even hidden when a building is blocking it?

Second, can I set an object with altitude that can make me be able to mark places on different floors in a building, or draw something on the roof?


Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
655 questions
0 comments No comments
{count} votes

Accepted answer
  1. rbrundritt 16,456 Reputation points Microsoft Employee
    1. The reason why the roads appear grayer is because the building is semi-transparent gray. There is no styling logic to determine when a building is in front of another object on the map, however, the map supports layering and you can have your layer added above the building layer (default experience for custom layers), so the semi-transparent gray of the building would be rendered behind your data. You can see this with the POI labels on the map as they are clearly visible any way you move the map/buildings. If you want your object to render behind buildings in a more natural way, but not have the graying, there is no way to achieve that.
    2. Currently the only items that can have altitude are extruded polygons. So you could create "cubes" and set them at a desired altitude by passing the altitude value in as the "base" style setting of the layer.

    There is also an unsupported way to get access to the maps WebGL context and create customer renderings that include altitude, however this is a lot of work at the moment. I've built a proof of concept for this and sent it over to the maps team with hope they will add this in the future. You can access the proof of concept here:!AgFqp4QkIjUNqO06q7xp7H7RolV-7A?e=F3Kd3d

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful