Created
May 15, 2018 00:43
-
-
Save mosesliao/c13c74fc8b45a9bcf2264e8d94138851 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title> | |
CakePHP: the rapid development php framework: | |
Transactions </title> | |
<link href="/favicon.ico" type="image/x-icon" rel="icon"/><link href="/favicon.ico" type="image/x-icon" rel="shortcut icon"/> | |
<script src="http://maps.google.com/maps/api/js?v=3&key=AIzaSyBl6Vu28zHBKtTNf8aIWz8-G7krE89_F5E"></script><script>var matching = { | |
}; | |
var gIcons0 = { | |
}; | |
jQuery(document).ready(function() { | |
var initialLocation = new google.maps.LatLng(51, 11); | |
var browserSupportFlag = new Boolean(); | |
var myOptions = {zoom: 6, streetViewControl: false, navigationControl: true, mapTypeControl: true, scaleControl: true, scrollwheel: false, keyboardShortcuts: true, center: initialLocation, navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL}, mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR, position: google.maps.ControlPosition.RIGHT_CENTER}, mapTypeId: google.maps.MapTypeId.ROADMAP}; | |
// deprecated | |
gMarkers0 = new Array(); | |
gInfoWindows0 = new Array(); | |
gWindowContents0 = new Array(); | |
var map0 = new google.maps.Map(document.getElementById("someothers"), myOptions); | |
var x0 = new google.maps.Marker({ | |
position: new google.maps.LatLng(1.35412,103.955), | |
map: map0, | |
title: "Log in Location" | |
}); | |
gMarkers0 .push( | |
x0 | |
); | |
var x1 = new google.maps.Marker({ | |
position: new google.maps.LatLng(1.35411,103.955), | |
map: map0, | |
title: "Log out location" | |
}); | |
gMarkers0 .push( | |
x1 | |
); | |
// Try W3C Geolocation (Preferred) | |
if (navigator.geolocation) { | |
browserSupportFlag = true; | |
navigator.geolocation.getCurrentPosition(function(position) { | |
geolocationCallback(position.coords.latitude, position.coords.longitude); | |
}, function() { | |
handleNoGeolocation(browserSupportFlag); | |
}); | |
// Try Google Gears Geolocation | |
} else if (google.gears) { | |
browserSupportFlag = true; | |
var geo = google.gears.factory.create("beta.geolocation"); | |
geo.getCurrentPosition(function(position) { | |
geolocationCallback(position.latitude, position.longitude); | |
}, function() { | |
handleNoGeoLocation(browserSupportFlag); | |
}); | |
// Browser doesn't support Geolocation | |
} else { | |
browserSupportFlag = false; | |
handleNoGeolocation(browserSupportFlag); | |
} | |
function geolocationCallback(lat, lng) { | |
initialLocation = new google.maps.LatLng(lat, lng); | |
map0 . setCenter(initialLocation); | |
} | |
function handleNoGeolocation(errorFlag) { | |
if (errorFlag == true) { | |
//alert("Geolocation service failed."); | |
} else { | |
//alert("Your browser doesn't support geolocation. We've placed you in Siberia."); | |
} | |
//map0 . setCenter(initialLocation); | |
} | |
});</script></head> | |
<body> | |
<div class="container clearfix"> | |
<div class="transactions view large-10 medium-8 columns content"> | |
<div id="someothers" class="map" style="width: 100%;height: 400px;">Map cannot be displayed!</div></div> | |
</div> | |
<script id="__debug_kit" data-id="dec391ac-829c-4602-b4e2-90092b5867ac" data-url="http://localhost/" src="/debug_kit/js/toolbar.js?1520533270"></script></body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment