-2
我需要在谷歌地圖中使用ajax調用動態設置標記。 如何可能如何使用ajax在谷歌地圖上設置標記?
我需要的代碼代碼。
我想ajax調用來更新谷歌地圖。
更新動態用ajax
var locations = [['spain',-41.054502,160.136719,'Uk',35.666222 ,39.019184],['china',58.025555,87.714844,'United Stat',35.666222 ,-44.472656],['Hong Kong',62.057586,44.121094,'United Stat',12.801088,18.457031],['Hong Kong',40.4523,102.128906,'United Stat',35.666222 ,-70.472656],['Hong Kong',28.526622,-76.816406,'United Stat',35.666222 ,-65.472656],['Hong Kong',28.526622,-76.816406,'United Stat',35.666222 ,-40.472656],['Hong Kong',28.526622,-45.816406,'United Stat',35.666222 ,-44.472656],['Hong Kong',28.526622,-24.816406,'United Stat',35.666222 ,-44.472656],['Hong Kong',28.526622,-76.816406,'United Stat',35.666222 ,-44.472656],['Hong Kong',28.526622,-76.816406,'United Stat',35.666222 ,-44.472656]];
function initialize() {
var styledMapType = new google.maps.StyledMapType(
[
{
"featureType": "all",
"elementType": "labels.text.fill",
"stylers": [
{
"saturation": 36
},
{
"color": "#ffffff"
},
{
"lightness": 40
}
]
},
{
"featureType": "all",
"elementType": "labels.text.stroke",
"stylers": [
{
"visibility": "on"
},
{
"color": "#000000"
},
{
"lightness": 16
}
]
},
{
"featureType": "all",
"elementType": "labels.icon",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "administrative",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#ffffff"
},
{
"lightness": 20
}
]
},
{
"featureType": "administrative",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#ffffff"
},
{
"lightness": 17
},
{
"weight": 1.2
}
]
},
{
"featureType": "landscape",
"elementType": "geometry",
"stylers": [
{
"color": "#000000"
},
{
"lightness": 20
}
]
},
{
"featureType": "poi",
"elementType": "geometry",
"stylers": [
{
"color": "#ffffff"
},
{
"lightness": 21
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#000000"
},
{
"lightness": 17
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#000000"
},
{
"lightness": 29
},
{
"weight": 0.2
}
]
},
{
"featureType": "road.arterial",
"elementType": "geometry",
"stylers": [
{
"color": "#000000"
},
{
"lightness": 18
}
]
},
{
"featureType": "road.local",
標記我用這個代碼更新標記
這不是一個代碼編寫服務,如圖所示。請提供您所嘗試的我們可以幫助排除故障。 – Iceman