<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<title>家庭百科--房屋租赁、房产出售等家庭常用信息。</title>
<style type="text/css">
html{height:100%}
body{height:100%;margin:0px;padding:0px}
#container{height:100%}
</style>
<script src="https://maps-api-ssl.google.com/maps/api/js?v=3&sensor=true" type="text/javascript"></script>
</head>
<body>
<div id="container"></div>
<script type="text/javascript">
var latlng = new google.maps.LatLng(37.736,115.69);
var myOptions = {
zoom:16,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("container"), myOptions);
//获取地理位置信息
if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(function(position) {
latlng = new google.maps.LatLng(position.coords.latitude,position.coords.longitude);
map.setCenter(initialLocation);
});
}else if (google.gears) {
var geo = google.gears.factory.create('beta.geolocation');
geo.getCurrentPosition(function(position) {
latlng = new google.maps.LatLng(position.latitude,position.longitude);
map.setCenter(initialLocation);
});
}
</script>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<title>家庭百科--房屋租赁、房产出售等家庭常用信息。</title>
<style type="text/css">
html{height:100%}
body{height:100%;margin:0px;padding:0px}
#container{height:100%}
</style>
<script src="https://maps-api-ssl.google.com/maps/api/js?v=3&sensor=true" type="text/javascript"></script>
</head>
<body>
<div id="container"></div>
<script type="text/javascript">
var latlng = new google.maps.LatLng(37.736,115.69);
var myOptions = {
zoom:16,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("container"), myOptions);
//获取地理位置信息
if(navigator.geolocation){
navigator.geolocation.getCurrentPosition(function(position) {
latlng = new google.maps.LatLng(position.coords.latitude,position.coords.longitude);
map.setCenter(initialLocation);
});
}else if (google.gears) {
var geo = google.gears.factory.create('beta.geolocation');
geo.getCurrentPosition(function(position) {
latlng = new google.maps.LatLng(position.latitude,position.longitude);
map.setCenter(initialLocation);
});
}
</script>
</body>
</html>