如何将 google api v2 升级到 v3?我想将我的源代码升级到 v3。
我尝试搜索谷歌,但我没有得到任何合适的结果。
var maprecent;
function init_maprecent() {
function createMarker(point, myHtml) {
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function()
{ maprecent.openInfoWindowHtml(point, myHtml, {maxWidth:200}); }); return marker; }
var markerindex = 0; var markers = new Array();
function animate_marker() {
if(markerindex==markers.length) {markerindex=0;}
GEvent.trigger(markers[markerindex], "click"); markerindex++;
setTimeout(animate_marker, 5000);
}
var bottomLeft = new GControlPosition(G_ANCHOR_BOTTOM_LEFT);
maprecent = new GMap2(document.getElementById("smallmaprecent"));
maprecent.addControl(new GSmallZoomControl());
maprecent.addControl(new GMapTypeControl(), bottomLeft);
maprecent.setCenter(new GLatLng(11.25,-60.66667), 10);
var m0 = createMarker(new GLatLng(-32.3153071,115.8290544),
'Project on abcd.com<br>Oct 04 2010 03:41PM<br><a target="_parent" href="http://www.gurusocialscript.com/project_9_project-on-freelancerclonescriptcom.html">View project</a><br>2 ');
maprecent.addOverlay(m0);
markers.push(m0);
maprecent.addOverlay(new GPolygon([new GLatLng(-32.3153071,115.8290544),
new GLatLng(-32.3153071,115.8290544),
new GLatLng(-32.3153071,115.8290544),
new GLatLng(-32.3153071,115.8290544),
new GLatLng(-32.3153071,115.8290544)],
"#000000", 1, 0.5, "#444488", 0.1));</br></br></br>
animate_marker();
}