public void CreateMarker() { string id = PolygonCollectionManager.FindId(instanceObj); var polygon = PolygonCollectionManager.GetPolygonData(id); cacheList = new List <PointLatLng>(polygon._point); tempList = new List <PointLatLng>(polygon._point); var prevOvl = instanceMain.GetOverlay("previewOverlay"); prevOvl.IsVisibile = true; prevOvl.Polygons.Clear(); prevOvl.Markers.Clear(); markerList = new List <GMarkerGoogle>(); foreach (var j in polygon._point) { var preMarker = new GMarkerGoogle(j, GMarkerGoogleType.orange_small); prevOvl.Markers.Add(preMarker); markerList.Add(preMarker); } }
public void View(GMapPolygon viewObj) { string id = PolygonCollectionManager.FindId(viewObj); if (id != null) { Debug.WriteLine(id); } var polygonData = PolygonCollectionManager.GetPolygonData(id); if (main.isRdClicked) { instanceResource.SetObj(viewObj); instanceResource.FillAttributes(polygonData.name, polygonData.statusEx, polygonData.statusIn, polygonData._point, id); } else if (main.isRaClicked) { instanceRa.FillAttributes(polygonData.name, polygonData._point); instanceRa.SetObject(viewObj); } }
private void btnEdit_Click(object sender, EventArgs e) { this.main.isPolygonEdit = true; this.btnEdit.Visible = false; this.btnDel.Visible = false; this.isEdit = true; this.btnEditConfirm.Visible = true; string id = collectionManager.FindId(obj); var polygonData = collectionManager.GetPolygonData(id); this.cacheList = new List <PointLatLng>(polygonData._point); foreach (var j in polygonData._point) { GMapOverlay previewOverlay = main.GetOverlay("previewOverlay"); previewOverlay.IsVisibile = true; GMarkerGoogle marker = new GMarkerGoogle(j, GMarkerGoogleType.orange_small); this.markerList.Add(marker); previewOverlay.Markers.Add(marker); } var polygonOverlay = main.GetOverlay("polygonOverlay"); polygonOverlay.IsVisibile = false; }