Is it possible to show 3D building model on the Azure Maps with thid-party map control plugin?

Kent010341 231 Reputation points
2022-05-27T02:39:55.637+00:00

Currently, I'm trying to use CesiumJS, and I hope that I can get access to more 3D buildings, so I think maybe Azure Maps can help.

Since Cesium only provides OSM buildings that do not fully have all the buildings globally, and I found that Azure Maps has provided a CesiumJS plugin to use the tiles of Azure Maps in Cesium, I'd like to know if it's possible to show the 3D buildings model (like this demo) provided by Azure Maps with Cesium.

Not only Cesium, but I'd also like to know if it's possible to show the 3D buildings model provided by Azure Maps with Leaflet or OpenLayers.

Thanks.

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

Accepted answer
  1. rbrundritt 20,921 Reputation points Microsoft Employee Moderator
    2022-05-27T16:15:54.003+00:00

    The "3D buildings" you see in Azure Maps are actually extruded polygons of the footprint. Some buildings look more detailed than others as the footprint is broken up into multiple pieces and given different heights, so this is technically 2.5D buildings. This data is available in the vector tiles of Azure Maps. The Azure Maps vector tiles algin with the Mapbox vector tile open standard. Getting these to work in Cesium would likely be a decent amount of work. There is an open-source library here: https://github.com/robbo1975/MapboxVectorTileImageryProvider that reads vector tiles and styles, however I don't think it supports extruded polygons. Digging into this library, it looks like it converts the data to GeoJSON, and looking at the Cesium samples, there is a way to create extruded polygons via GeoJSON: https://sandcastle.cesium.com/?src=GeoJSON%20and%20TopoJSON.html (press the custom style button) I suspect you will need to style the polygons like this:

    entity.polygon.height = entity.properties.ground_height;
    entity.polygon.extrudedHeight = entity.properties.height;
    
    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.