question

Kent010341 avatar image
0 Votes"
Kent010341 asked rbrundritt answered

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

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?

Thanks.

azure-maps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

rbrundritt avatar image
1 Vote"
rbrundritt answered
  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: https://1drv.ms/u/s!AgFqp4QkIjUNqO06q7xp7H7RolV-7A?e=F3Kd3d

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.