0
我正在使用Subgurim地圖根據輸入地址設置標記。使用GMarker,我可以將它加載到Map中。獲取Subgurim地圖標記位置按鈕單擊事件
現在這個地址可能是錯誤的或附近的實際地址。所以,我給機會,客戶以不同的標記設置實際地址(這是起泡時,一個名爲「選擇泡沫」按鈕,按鈕)
一樣,
StringBuilder sb = new StringBuilder();
sb.Append(txtAddress.Text.Trim());
sb.AppendFormat(", {0}", txtCity.Text.Trim());
sb.AppendFormat("- {0}", txtZipcode.Text.Trim());
sb.Append(", Gujarat");
sb.AppendFormat(", {0}", txtCountry.Text.Trim());
GetAddressCordinates googleCordinate = new GetAddressCordinates(Constants.APP_SETTINGS.GoogleMapAPIKey);
Coordinate cordinate = googleCordinate.GetCoordinates(sb.ToString());
GLatLng gLatLng = new GLatLng();
{
gLatLng.lat = double.Parse(cordinate.Latitude.ToString());
gLatLng.lng = double.Parse(cordinate.Longitude.ToString());
}
if (gLatLng != null)
{
GMarker gMarker;
GIcon gIcon = new GIcon();
gIcon.image = ResolveUrl(string.Format("~/Images/ActualFlag.png"));
gIcon.shadow = ResolveUrl(string.Format("~/Images/Shadow.png"));
gIcon.shadowSize = new GSize(30, 30);
gIcon.iconSize = new GSize(24, 24);
GMarkerOptions mOpts = new GMarkerOptions();
mOpts.draggable = true;
mOpts.RaiseOnDrag = true;
mOpts.Animation = GMarkerOptions.AnimationType.Bounce;
mOpts.icon = gIcon;
gMarker = new GMarker(gLatLng, mOpts);
GInfoWindow infoWindow = new GInfoWindow(gMarker, "", false);
GMap1.addInfoWindow(infoWindow);
//GMap1.addGMarker(gMarker);
string jsFunction = string.Format("function(){{ var ev = new serverEvent('dragend', 0); ev.addArg({0}.getPoint().lat()); ev.addArg({0}.getPoint().lng()); ev.send(); }}", gMarker.ID);
GListener listener = new GListener(gMarker.ID, GListener.Event.dragend, "alertame");
GMap1.Add(listener);
GMap1.setCenter(gLatLng);
}
現在,我想這兩個標記位置進入稱爲「NEXT」的按鈕用於操作。
我將如何獲得標記位置?