14. navigator.geolocation.getCurr
entPosition(successCallback,
errorCallback);
function successCallback(position)
coordinates
position.coords.latitude:
position.coords.longitude:
position.coords.altitude: m
position.coords.accuracy: m
position.coords.altitudeAccuracy: m
position.coords.heading:
position.coords.speed: m/s
※HTML
69. <script src="http://geohex.net/gm.js" type="text/javascript" content="text/html;
charset=utf-8"></script>
function initialize() {
var gMapType = new google.maps.StyledMapType(stylez,
{name: "green"});
// Create a map object, and include the MapTypeId to add
// to the map type control.
var mapOptions = {
zoom: 11,
mapTypeControlOptions: {
mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'green']
}
};
var map = new google.maps.Map(document.getElementById('map_canvas'),
mapOptions);
//Associate the styled map with the MapTypeId and set it to display.
map.mapTypes.set('green', gMapType);
map.setMapTypeId('green');
}