Friday, August 31, 2012

GWT Maps V3 Api, clearing directions

I'm using the GWT Maps V3 Api from

After finding directions on the map, I'm trying to clear the previous ones before finding new.

In DirectionsRenderer:

   * This method specifies the map on which directions will be rendered. Pass null to remove the directions from the map.
   * @param mapWidget
  public final void setMap(MapWidget mapWidget) {

  private final native void setMapImpl(MapImpl map) /*-{

I'm trying to pass:


which results in NPE:

Caused by: java.lang.NullPointerException: null

Anyone used this API and knows how to clear directions from the map widget?

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment