googlemap
javascriptでgooglemapを用いている。 その際に現在地を取得する必要があったのでメモ。 以下がサンプルコード if (navigator.geolocation){ navigator.geolocation.getCurrentPosition(function(position){ alert("現在地の座標は("+String(position.coords…
マップの中央を指定した座標にしたい場合 handler = Gmap.build('Google') ; var map = handler.getMap() ; pos = new google.maps.LatLng("30","30") ; map.setCenter(pos) ;