<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAvABrzCnRluKK0Cj97fTMThTNR7aHVSEFb0WbViWwc6F-_w9PjBSogZu_7UgOTbx25ka46X-fnGmyvw" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var imgFLG=0;
function load() {
if(GBrowserIsCompatible()){
/* 地図インスタンス生成 */
var map=new GMap2(document.getElementById("map"));
map.disableDragging(); /* 地図のドラッグ操作を無効化 */
map.disableDoubleClickZoom(); /* 地図のダブルクリックによるズーム操作を無効化 */
/* ピクセル座標 */
var center=new GLatLng(36.173357,138.251953); /* 日本 */
/* 中心地点 */
map.setCenter(center, 2);
/* アイコン */
var icon=new GIcon();
icon.image="/content/img/ajax/googlemap/bg_off.png"; /* マーカー画像 */
icon.iconSize=new GSize(200, 168);
icon.iconAnchor = new GPoint(100, 60);
/* マーカー追加 */
var marker=new GMarker(center, icon);
map.addOverlay(marker);
/* マーカがクリックされた時 */
GEvent.addListener(marker, "click", function(){
/* 画像のURLを変更 */
if(imgFLG==0){
marker.setImage("/content/img/ajax/googlemap/bg_on.png");
imgFLG=1;
}else{
marker.setImage("/content/img/ajax/googlemap/bg_off.png");
imgFLG=0;
}
});
}
}
window.onload=load;
window.unload=GUnload;
//]]>
</script>
<div id="map" style="width:425px;height:300px"><!-- 地図描画領域 --></div>