Skip to content

Instantly share code, notes, and snippets.

@stenrdj
Created September 8, 2017 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stenrdj/aaeb4e73c63348e3ca5fb9978df5dc53 to your computer and use it in GitHub Desktop.
Save stenrdj/aaeb4e73c63348e3ca5fb9978df5dc53 to your computer and use it in GitHub Desktop.
JS - Google maps api get zoomed area markers
private boolean isVisibile(Marker marker)
{
if(googleMap != null)
{
//This is the current user-viewable region of the map
LatLngBounds latLongBounds = googleMap.getProjection().getVisibleRegion().latLngBounds;
if(latLongBounds.contains(marker.getPosition()))
//If the item is within the the bounds of the screen
return true;
else
//If the marker is off screen
return false;
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment