Skip to content

Instantly share code, notes, and snippets.

View stenrdj's full-sized avatar
🎯
Focusing

Aziz Segaoui stenrdj

🎯
Focusing
View GitHub Profile
@stenrdj
stenrdj / README.md
Created September 20, 2017 10:45 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@stenrdj
stenrdj / geolocalisation.js
Last active September 20, 2017 10:40
JS - Navigator geolocalisation longitude and latitude
if ("geolocation" in navigator) {
navigator.geolocation.getCurrentPosition(function(position) {
// Yes navigator got geolocation and you got permitions to use it
alert(position.coords.latitude, position.coords.longitude);
});
} else {
alert('sorry your browser not support geolocalisation');
}
@stenrdj
stenrdj / geolocalisation.js
Created September 8, 2017 11:12
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;