Add a 3D layer on a Google Maps object

狂风中的少年 提交于 2019-12-22 01:15:14

问题


I want to add a 3D layer showing cloud location and elevation on a Google Maps.

The idea is that when you tilt the map (ctrl+drag in Earth mode) you could see how high each cloud is.

I found this article which explains how to add 3D buildings but it's "fakes", cheating with the latitudes to get some height effect:

http://johndyer.name/drawing-3d-objects-and-building-on-google-maps/

I couldn't find anything up to date in the doc.


回答1:


Google seems to be silent about 3D features in Javascript API. Closest I can get to this are Styled Maps but nowhere does it specifically indicate 3D. Only Android implementations are available as of now.

I did some research and found this library which help you build 2D and 3D: https://github.com/OSMBuildings/OSMBuildings




回答2:


Another option is Cesium JS:

An open-source JavaScript library for world-class 3D globes and maps

https://cesiumjs.org/



来源:https://stackoverflow.com/questions/40715320/add-a-3d-layer-on-a-google-maps-object

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!