Question

After the initial onCreate method in Android, are there any other methods to update or change the original content in the onCreate method.

For example I initiate a GoogleMap in the onCreate method, with polylines and circles drawn over it. Is there a way to update this map so the old polylines and circles are removed and replaced by new ones?

Cheers in advance.

Was it helpful?

Solution

You can call map.clear() which removes all markers, polylines etc. and leaves a plain map. Now you can add some new stuff.

If you wanna remove just specific map objects like a polyline hold a reference and call remove.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top