我在ASP.net中使用Subgurim asp.net控件用于Google Maps。
问题是我需要在地图上显示两个点的ARROWED POLYLINE。
以下是我的代码,但不幸的是我无法应用任何内容:
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);
问候, 维沙尔
答案 0 :(得分:3)
我认为您使用的是Google Maps API v2。
有两个问题: