Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は本当に便利なウェブサービスを構築しようとしていて、グーグルマップを使用して場所の選択を単純化したいと思っています。地図をクリックするだけで経度と緯度を取得して入力タグに書き留める可能性はありますか?
これが私がこれを行う方法です:
var map = ...; google.maps.event.addListener(map, 'click', function (event) { $('input.latitude').val(event.latLng.lat()); $('input.longitude').val(event.latLng.lng()); });