我在 ASP.net 中为 Google Maps 使用 Subgurim asp.net 控件。问题是我需要在地图上的两个点之间显示一条箭头折线。
以下是我的代码,但不幸的是我无法为此应用任何东西:
GLatLng from = new GLatLng(FromLan, FromLon);
GLatLng To = new GLatLng(ToLan, ToLon);
GLatLngBounds llbound = new GLatLngBounds(from, To);
GMap2.GZoom = GMap2.getBoundsZoomLevel(llbound);
GMap2.setCenter(llbound.getCenter());
GLatLng inside = llbound.getCenter();
bool isInside = llbound.contains(inside);
GPolyline objpolyline = new GPolyline();
objpolyline.points.Add(from);
objpolyline.points.Add(To);
objpolyline.color = "red";
objpolyline.colorNet = System.Drawing.Color.Red;
objpolyline.clickable = false;
objpolyline.PolylineID = "Route";
objpolyline.geodesic = true;
//Javascript Code
//pts1.push (new GLatLng(lat111, lng222));
//var poly1 = new BDCCArrowedPolyline(pts1,"#FF0000",4,0.3,
// null,30,7,"#0000FF",2,0.5);
//map.addOverlay(poly1);
GMap2.addPolyline(objpolyline);
//GMap2.addPolyline(objpolyline);
问候,维沙尔