Created
September 8, 2017 11:12
-
-
Save stenrdj/aaeb4e73c63348e3ca5fb9978df5dc53 to your computer and use it in GitHub Desktop.
JS - Google maps api get zoomed area markers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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