This file contains 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
// On resizing window on desktop | |
$(window).bind('resize',function(){ | |
if($(window).innerWidth() < 450) { | |
// your code here for responsive | |
}else{ | |
//your code here for desktop | |
} | |
}); | |
//end | |
// Checking if its on desktop and make |
This file contains 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; |
This file contains 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
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'); | |
} |
NewerOlder