gpt4 book ai didi

android - 如何更改 OSM map 自定义主题?

转载 作者:行者123 更新时间:2023-12-05 00:07:48 27 4
gpt4 key购买 nike

我用的是osm贴图,我想换贴图样式

如何在开放街道 map 中更改 android map 的主题颜色和样式 - 我想为特定目的完全简化 map 并删除特定元素的颜色。

binding!!.mapView.apply {


setTileSource(TileSourceFactory.DEFAULT_TILE_SOURCE)
zoomController.setVisibility(CustomZoomButtonsController.Visibility.NEVER)
setMultiTouchControls(true)
val mapController: IMapController = controller
mapController.setZoom(12.0)

val zoomLocation = GeoPoint(it.from_lat.toDouble(), it.from_lng.toDouble())

mapController.setCenter(zoomLocation)
startMarker.position = zoomLocation // marker location



}

enter image description here

looking android theme like this screenshot (movie app).** I am looking free solution**

enter image description here

最佳答案

试试这个解决方案:会减少一些加载时间

binding.osmView.apply {



val matrixA = ColorMatrix()
matrixA.setSaturation(0.3f)
val matrixB = ColorMatrix()
matrixB.setScale(1.12f, 1.13f, 1.13f, 1.0f)
matrixA.setConcat(matrixB, matrixA)
val filter = ColorMatrixColorFilter(matrixA)
overlayManager.tilesOverlay.setColorFilter(filter) // TilesOverlay.INVERT_COLORS
}

关于android - 如何更改 OSM map 自定义主题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68045781/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com