Google Maps API 質問箱at PHP
Google Maps API 質問箱 - 暇つぶし2ch736:727
08/01/10 11:09:03
>>735にコメントついてました。また、試行錯誤の結果、とりあえず、明示的にアイコンを指定するとドラッグについては回避できました。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "URLリンク(www.w3.org)">
<html xmlns="URLリンク(www.w3.org)">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps API2 Sample</title>
<script src="URLリンク(maps.google.com)" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
window.onload = function() {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(37,136), 5,G_NORMAL_MAP);
map.addControl(new GLargeMapControl());
map.addControl(new GScaleControl());
var _icon = new GIcon();
_icon.image = "URLリンク(labs.google.com)";
_icon.iconSize = new GSize(12, 20);
_icon.iconAnchor = new GPoint(6, 20);
var marker1 = new GMarker(new GPoint(138, 36),{icon:_icon,draggable:true}); //Win2K IE6でも問題ないマーカー
var marker2 = new GMarker(new GPoint(138, 34),{draggable:true}); //Win2K IE6でクリックイベントが発生しないマーカー
map.addOverlay(marker1);
map.addOverlay(marker2);
//GEvent.addListener(marker1, "click", function(){alert("Marker1 Click!!");});
//GEvent.addListener(marker2, "click", function(){alert("Marker2 Click!!");});
} //]]>
</script></head>
<body><div id="map" style="width: 500px; height: 400px"></div></body></html>


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch