-1

During the CameraChange event I add new markers to the map, so I want to know if they are removed automatically when they become invisible as the camera has moved.

Does anyone have this information?

juliano.net
  • 7,982
  • 13
  • 70
  • 164

1 Answers1

0

Do you mean, are markers removed when the map is panned such that the marker is no longer on the screen? If so, the answer is no, the markers are still "on the map" even when "off screen".

If you would like to remove markers as they are moved off the map, please see my answer to this question

Community
  • 1
  • 1
DiscDev
  • 38,652
  • 20
  • 117
  • 133
  • Your answer has a suggestion that Google also made on their documentation about getProjection cost. You've said to grab the projection just once, but if I get the projection and store it in a variable, will the getVisibleRegion() get new values when the onCameraChange event is fired? – juliano.net Jan 14 '13 at 18:11
  • Yes - getVisibleRegion() will be different each time that event fires. Maybe "grab it once" was unclear. I meant if you're looping over a large set of markers each time onCameraChange is fired, only grab the projection at the beginning of the loop, and not for each Marker in the loop. – DiscDev Jan 14 '13 at 18:16