From 996e5ba8361ee712072702283f22827463a2f8da Mon Sep 17 00:00:00 2001 From: cbwu <504-wuchengbo@htsdfp.com> Date: Sat, 1 Jun 2024 09:45:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E6=A0=87=E8=AE=B0=E7=82=B9bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DlgMarker.cpp | 5 +++++ GISDlg.cpp | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/DlgMarker.cpp b/DlgMarker.cpp index b776a45..b9a8b42 100644 --- a/DlgMarker.cpp +++ b/DlgMarker.cpp @@ -16,6 +16,11 @@ CDlgMarker::CDlgMarker(CWnd* pParent /*=NULL*/) EnableVisualManagerStyle(TRUE, TRUE); m_iSelectedIndex = -1; + + for (int i=0;i @@ -2593,7 +2594,7 @@ void CGISDlg::MouseDownMap1(short Button, short Shift, long x, long y) m_CircleGuideLayer = m_map.NewDrawing(1); } - double radius = circleGuidenceDlg.g_radius/abs(2*M_PI*6371000*cos(m_guidePtInfo.guidePtLat*M_PI/180)/360); + double radius = circleGuidenceDlg.g_radius/abs(2*M_PI*6378137*cos(m_guidePtInfo.guidePtLat*M_PI/180)/360); m_map.DrawWideCircleEx(m_CircleGuideLayer,m_guidePtInfo.guidePtLon,m_guidePtInfo.guidePtLat,radius,RGB(248,252,55),false,2); m_map.Redraw(); From f3696d4f5bc6efd74c7bea47bf890483d63879ec Mon Sep 17 00:00:00 2001 From: cbwu <504-wuchengbo@htsdfp.com> Date: Wed, 5 Jun 2024 17:43:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=99=90=E9=A3=9E?= =?UTF-8?q?=E5=8C=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DlgMarker.cpp | 4 ++-- GISDlg.cpp | 12 +++++++++++- Globe.h | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/DlgMarker.cpp b/DlgMarker.cpp index b9a8b42..520cf33 100644 --- a/DlgMarker.cpp +++ b/DlgMarker.cpp @@ -111,9 +111,9 @@ void CDlgMarker::ShowMarkerCoordinate(double& markerLon, double& markerLat) void CDlgMarker::OnBnClickedButtonAddMarker() { //最多支持20个标记点 - if (g_iHaveMarkedPts >= 20) + if (g_iHaveMarkedPts >= 120) { - BCGPMessageBoxEx(NULL,_T("最多支持20个标记点!"),_T("Tip"),MB_OK,MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US)); + BCGPMessageBoxEx(NULL,_T("最多支持120个标记点!"),_T("Tip"),MB_OK,MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US)); return ; } diff --git a/GISDlg.cpp b/GISDlg.cpp index 59f11e2..1af8e90 100644 --- a/GISDlg.cpp +++ b/GISDlg.cpp @@ -7791,6 +7791,14 @@ void CGISDlg::ShowSaveZoneDlg(double* xPoints,double* yPoints) OnShowGivenLine(filename); m_map.Redraw(); } + else + { + if (m_tempZoneLayerID>=0) + { + m_map.RemoveLayer(m_tempZoneLayerID); + m_tempZoneLayerID = -1; + } + } } @@ -7865,12 +7873,14 @@ void CGISDlg::DrawRestrictedZone(long& layerID,double* xPoints,double* yPoints,i if(type == 0){//限飞区黄色 pShapeDrawingOption->LineColor = RGB(250,173,20); pShapeDrawingOption->FillColor = RGB(254,252,233);//RGB(244,206,199); + //pShapeDrawingOption->LineColor = RGB(212,212,252); + //pShapeDrawingOption->FillColor = RGB(0,255,255);//RGB(244,206,199); }else if(type==1){ //禁飞区红色 pShapeDrawingOption->LineColor = RGB(220,38,38); pShapeDrawingOption->FillColor = RGB(254,243,243);//RGB(244,206,199); } pShapeDrawingOption->LineWidth = 2; - pShapeDrawingOption->FillTransparency = 180; //透明度 + pShapeDrawingOption->FillTransparency = 60; //透明度 (m_map.GetShapefile(layerID)).SetDefaultDrawingOptions(pShapeDrawingOption); }; diff --git a/Globe.h b/Globe.h index af5b5a1..cc2e9de 100644 --- a/Globe.h +++ b/Globe.h @@ -260,7 +260,7 @@ extern long g_lDemPtNumLayerID[g_iDemAltPtNum]; extern bool g_bSelectMarker; //最大支持的标记点数 -const int g_iMarkerPtNum = 20; +const int g_iMarkerPtNum = 120; //标记点图层 extern long g_lMarkerLayerID[g_iMarkerPtNum];