Restricting the area the user can go to on Mapview

前端 未结 4 1889
陌清茗
陌清茗 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:09

    Update: I know this is an old question, but osmdroid now has a setScrollableAreaLimit() method that will achieve what you are looking for. There is also a setMinZoomLevel() and setMaxZoomLevel() method to easily restrict zoom levels.

    Original answer:

    Please keep an eye on:

    http://code.google.com/p/osmdroid/issues/detail?id=209

    A patch has already been created, and will likely be integrated shortly.

提交回复
热议问题