簡體   English   中英

將數據緯度/經度從Google Maps API保存到數據庫中?

[英]Saving data lat/lng into db from google maps api?

我正在使用asp.net C#和Google Maps API。 我希望用戶可以在地圖上設置路線或標記,並且可以將點保存在sql中以再次顯示它們。

有一些代碼@Chad Killingsworth編寫它用於路由,但是如何捕獲lat / lng並寫入db? 使用Google Maps API v3折線捕捉到道路 http://people.missouristate.edu/chadkillingsworth/mapsexamples/snaptoroad.htm

還是這是我想要的,但是在php中,如何使用asp.net做到這一點? 我如何知道要點並記錄分貝?

http://vikku.info/programming/google-maps-v3/draggable-directions/saving-draggable-directions-saving-waypoints-google-directions-google-maps-v3.htm

您可以像這樣獲取值,然后保存該值。

google.maps.event.addListener(地圖,“點擊”,函數(事件){

                var p = new google.maps.LatLng(event.latLng.lat(), event.latLng.lng());
                marker.setPosition(p);
                p.lng();
                p.lat();   

                });

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM