Restricting the area the user can go to on Mapview

前端 未结 4 1893
陌清茗
陌清茗 2021-02-10 10:22

I am using a customised version of the mapview (OSMDroid version). I am using custom tiles within it and I only want the user to be able to view the area where I have my custom

4条回答
  •  伪装坚强ぢ
    2021-02-10 11:23

    This is cross-posted from the osmdroid thread. There's now lists a BoundedMapView class, which implements the afortementioned patch.

    For those of use using the .jar or otherwise not that familiar with patches, I cobbled together a subclass of MapView that supports limiting the user's view to a specific area.

    Details on how to use it, if not obvious, can be found at http://www.sieswerda.net/2012/08/15/boundedmapview-a-mapview-with-limits/

提交回复
热议问题