Hi,
I use the code
final HasDirectionsRequest req = new DirectionsRequest();
req.setOriginLatLng(latLng);
req.setDestinationLatLng(destination);
String travelMode = new DirectionsTravelMode().Driving();
req.setTravelMode(travelMode);
final HasDirectionsService service = new DirectionsService();
if (!GWT.isScript())
{
removeGwtObjectId(req.getJso());
}
service.route(req, new DirectionsCallback()
{
@Override
public void callback(HasDirectionsResult res, String status)
{
if (status.equals("OK"))
{
HasDirectionsRendererOptions options = new
DirectionsRendererOptions();
options.setDirections(response);
options.setMap(mapWidget.getMap());
new DirectionsRenderer(options);
}
}
});
to display a route on the map and it work fine. But how is it possible
to clear the route on the map to display another one?
Gruß
Michael
On 8 Jan., 23:57, Ben <
benjgi...@gmail.com> wrote:
> Hello,
>
> First thanks for making this library available.
>
> I think I have fixed a couple of issues:
>
> 1. Routes
> a. Directions given in walking / driving were not working for me at
> least
> b. Units are given as a number (int) rather than a string
> 2. Polylines could not be removed as setting their map to null threw a
> null pointer exception rather than passing the null down.
>
> The patch can be found here:
>
>
https://github.com/benjgibbs/GWTCycleRoutePlanner/blob/master/GWTCycl...
>
> Kind Regards
>
> Ben