我的 android 应用程序中的 Google 地图 GoogleMap.MAP_TYPE_TERRAIN 冲掉了等高线和高程

Google maps in my android app with GoogleMap.MAP_TYPE_TERRAIN washes out the contour lines and elevations

我正在我的应用程序中测试一些不同的地图类型,我真的很想利用某些区域的地形图,MAP_TYPE_TERRAIN 似乎有这个。然而,我注意到当我放大时,我最初可以看到地形图上标记的等高线和高程,但随后 Google 将一些其他的瓷砖覆盖在它上面,冲掉了线条和海拔。它产生了一种整洁的效果,因为它给人一种 3D 的感觉,但我宁愿保留实际的地形信息以供我使用。是否有设置或我可以切换的东西来防止 API 添加额外的层?同样,正如我所说,当我平移到一个新区域或放大到一个不同的图块集时,我最初可以在那里看到它,它随后在 Google 完成绘制地图时被冲掉。

无法配置特定地图类型(TERRAIN、SATELITE 等)的默认行为。你能做的就是想出你自己的 custom TileOverlays.

这里有一些关于 Tile Overlays 的介绍。

The simplest and most common way of creating a tile overlay is to provide a URL pointing to the relevant tile image. UrlTileProvider is a partial implementation of TileProvider that provides image tiles based on a URL. This class requires that all the images have the same dimensions.

You will need to implement UrlTileProvider.getTileUrl(), which accepts the tile coordinates (x, y, zoom), and returns a URL pointing to the image to be used for the tile. The method should return null if there is no tile for the given x, y and zoom. A URL can point to a web resource, an Android asset, or a file on the local disk.