techiva / jquery-ui-map

Automatically exported from code.google.com/p/jquery-ui-map
0 stars 0 forks source link

If bad route is requested in "Get directions example", map is never refreshed again even w/good route #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Summary: if a "bad" (unobtainable) route is requested once using 
displayDirections, the map will never show a route again (like when a "good" 
to/from re-entered) on the map, but directions will be updated indicating a 
successful route was found.

1. 
http://jquery-ui-map.googlecode.com/svn/trunk/demos/jquery-mobile-example.html#j
query-mobile-example-3.html
2. Use default to/from and hit "Get directions" - map and directions - OK
3. Enter a bad "To" value (Hilo, HI, USA), leave Got. in "From" field
4. Hit "Get directions" - route is cleared from map, no directions - OK
5. Enter Stockholm, Sweden again in "To" field, hit "Get directions" ---> 
directions are updated, but map is not: no route shown even though success case.

What is the expected output? What do you see instead?
The route to be shown on map whenever route is possible.

Please use labels and text to provide additional information.
One fix is to add the line indicated with -->  <-- to jquery.ui.map.js:187

} else { 
instance.services.DirectionsRenderer.setMap(null);              
--> instance.services.DirectionsRenderer = null; <--
}

Original issue reported on code.google.com by libby.ba...@gmail.com on 22 May 2011 at 6:29

GoogleCodeExporter commented 8 years ago
Fixed in trunk... Added setOptions to the renderer.

Original comment by johansalllarsson on 24 May 2011 at 5:09