Google Maps direction results not changing after adress change
i mix geolocation and a form input for a route planner. After changing the adr开发者_如何学JAVAess in the form or using geolocation the map works great. But the directions in the directionsDisplay.setPanel are not changing :-(
Heres my code:
http://pastie.org/2001742
EDIT: i just realised that i get the new directions. But the old directions are not deleted. They show up one below the other...
Keep a reference to the previous DirectionsRenderer and call .setMap(null) when you want to disabled it.
精彩评论