Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't remove previous directions polygon from Google map #531

Open
GoogleCodeExporter opened this issue Jul 15, 2015 · 1 comment
Open

Comments

@GoogleCodeExporter
Copy link

GWT newbie here, trying to render locations on a Google map. 


Found in Release: google-maps (v3)  

Detailed description:
I'm rendering directions on the map using a query ...

Directions.load(query, opts, new DirectionsCallback() { ... 

I grab the polygon after it has rendered successfully.

public void onSuccess(DirectionResults result) {
route = result.getPolyline();

However when I rerun the query using different locations the old directions are 
not being removed

I've tried to get the polygon 'route' set it to invisible and remove it from 
the map before loading a new query ...

route.setVisible(Boolean.FALSE);
map.removeOverlay(route);   

but this doesn't work.

Workaround if you have one:


Links to the relevant GWT Developer Forum posts:


Thanks in advance.


Original issue reported on code.google.com by peterche...@gmail.com on 5 Dec 2013 at 9:47

@GoogleCodeExporter
Copy link
Author

Meant to say using gwt-maps.jar (v3)

Original comment by peterche...@gmail.com on 5 Dec 2013 at 9:48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant