/**
* Called on the initial page load.
*/
function init() {
var mapCenter = new google.maps.LatLng(0, 0);
var map = new google.maps.Map(document.getElementById('map'), {
'zoom': 0,
'center': mapCenter,
'mapTypeId': google.maps.MapTypeId.ROADMAP
});
// Create a draggable marker which will later on be binded to a
// Circle overlay.
var marker = new google.maps.Marker({
map: map,
position: new google.maps.LatLng(0, 0),
draggable: false,
visible: false,
});
// Add a Circle overlay to the map.
var circle = new google.maps.Circle({
map: map,
draggable: false,
fillColor: '#000080',
strokeColor: '#0000FF',
strokeWeight: '0.75',
radius: 1 // m
});
// Since Circle and Marker both extend MVCObject, you can bind them
// together using MVCObject's bindTo() method. Here, we're binding
// the Circle's center to the Marker's position.
// [code.google.com]
}
// Register an event listener to fire when the page finishes loading.
google.maps.event.addDomListener(window, 'load', init);
|
Διαβάστε όλο το άρθρο στο "Findbuysaleblog" »
Μεταφράστε αυτό το άρθρο (Translate this article) »

