Remove directions from google map api v3

后端 未结 6 1687
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-29 18:58

I have a google map using API v3 which gets directions from one location to another. The app works great but the window which gets the directions is an overlay on the map.

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-29 19:32

    None of the above worked for me, this is what I needed:

    // Clear past routes
        if (directionsDisplay != null) {
            directionsDisplay.setMap(null);
            directionsDisplay = null;
        }
    

提交回复
热议问题