01.
var
map;
02.
var
marker;
03.
var
markersArr = [];
04.
05.
06.
function
initialize() {
07.
var
latlng =
new
google.maps.LatLng(13.7031333333333, 100.518616666667);
08.
var
myOptions ={
09.
zoom: 12,
10.
center: latlng,
11.
mapTypeControl:
false
,
12.
mapTypeId: google.maps.MapTypeId.ROADMAP
13.
};
14.
15.
map =
new
google.maps.Map(document.getElementById(
"map_canvas"
), myOptions);
16.
17.
markersArr[0] =
new
google.maps.LatLng(13.771095, 100.530201666667);
18.
markersArr[1] =
new
google.maps.LatLng(13.76914, 100.528776666667);
19.
markersArr[2] =
new
google.maps.LatLng(13.73082, 100.517566666667);
20.
markersArr[3] =
new
google.maps.LatLng(13.7273633333333, 100.517475);
21.
markersArr[4] =
new
google.maps.LatLng(13.7145966666667, 100.52008);
22.
markersArr[5] =
new
google.maps.LatLng(13.7031333333333, 100.518616666667);
23.
markersArr[6] =
new
google.maps.LatLng(13.7012833333333, 100.519271666667);
24.
markersArr[7] =
new
google.maps.LatLng(13.6950733333333, 100.525245);
25.
markersArr[8] =
new
google.maps.LatLng(13.692845, 100.526658333333);
26.
markersArr[9] =
new
google.maps.LatLng(13.692045, 100.526266666667);
27.
28.
for
(i
in
markersArr) {
29.
30.
setTimeout(
"addMarker(markersArr["
+ i +
"])"
, 3000);
31.
}
32.
33.
}
34.
35.
36.
function
addMarker(mkr) {
37.
marker =
new
google.maps.Marker({ position: mkr, map: map, title:
""
+ mkr });
38.
}