Reputation: 977
Hi guys I'm developing an Android application which contains two google maps that are displayed one after the other. I have written two Activities for that namely:
CustomItemizedOverlay.java
CurrentLocations.java
The both of the above two Activities extends MapActivity.
Here first iam displaying CustomItemizedOverlay.java
which consists of multiple markers and in this Activity i have an Image when click on that image iam displaying CurrentLocation.java which shows current location with a Marker. When I click the Hardware back button in the CurrentLocation.java
I'm finishing this Activity and going to CustomItemizedOverlay
.
In this Activity previously I have displayed several Markers but now I'm not able to see the Markers, whenever I'm decreasing the Zoom level then I'm able to see the markers. From this CustomItemizedOverly
Activity if I go again to CurrentLocation
Activity this time I'm not able to see the CurrentLocation Marker too except the case when I decrease the zoom level.
I don't understand why because I'm restarting the Activity. Any ideas?
Upvotes: 0
Views: 221
Reputation: 303
I've had a few issues with the map view not refreshing in the past. From the sounds of it your map view isn't redrawing properly when the activity comes back into the foreground? If so try calling mapview.invalidate()
in the onResume()
override of the activity to force a redraw.
Upvotes: 1