Google マップの Java スクリプト コードをサイトに配置しましたが、機能しません。コードは次のとおりです。
function map_initialize() {
var latlng = [
__lats_and_langs__
];
if (google.maps.BrowserIsCompatible()) {
var image = new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=15|FF0000|000000",
new google.maps.Size(20, 34),
new google.maps.Point(0, 0),
new google.maps.Point(10, 34));
map = new google.maps.Map2(document.getElementById('salon_map'));
map.addControl(new google.maps.LargeMapControl3D());
map.addControl(new google.maps.MenuMapTypeControl());
map.setCenter(new google.maps.LatLng(0, 0), 0);
for (var i = 0; i < latlng.length; i++) {
var marker = new google.maps.Marker({
position: latlng[i],
map: map,
icon: image,
title: location[0],
zIndex: location[3]
});
//var marker = new google.maps.Marker(latlng[i]);
map.addOverlay(marker);
}
var latlngbounds = new google.maps.LatLngBounds();
for (var i = 0; i < latlng.length; i++) {
latlngbounds.extend(latlng[i]);
}
map.setCenter(latlngbounds.getCenter(), map.getBoundsZoomLevel(latlngbounds));
map.setZoom(12);
// put markers and custom icon ??
__marker_list__
}
}
// google.maps.Event.addDomListener(window, 'load', map_initialize);
google.maps.Event.addDomListener(window, 'unload', google.maps.Unload);
URL: http: //myshopsalon.com/find-a-shop-salon