wasimbhalli
wasimbhalli

Reputation: 5242

What method to call to update my overlay view in google map?

I've defined an overlay (implementing OverlayView) and after defining my overlay, I need to update some content in overlay. But it doesn't take effect unless I move the map.

What method to call so my overlay updates without moving the map? Is there a update/render method to update the view?

Upvotes: 4

Views: 4730

Answers (2)

skarE
skarE

Reputation: 5890

You can call the draw() function on the OverlayView, see the reference for more info.

Upvotes: 8

wasimbhalli
wasimbhalli

Reputation: 5242

I resolved the issue by using setMap(null) for removing the overlay and then redraw the complete overlay.

Upvotes: 0

Related Questions