Merge pull request 'dev/cbwu' (#28) from dev/cbwu into master

Reviewed-on: #28
master
WuChengbo 1 year ago
commit 535b69122c

@ -16,6 +16,11 @@ CDlgMarker::CDlgMarker(CWnd* pParent /*=NULL*/)
EnableVisualManagerStyle(TRUE, TRUE); EnableVisualManagerStyle(TRUE, TRUE);
m_iSelectedIndex = -1; m_iSelectedIndex = -1;
for (int i=0;i<g_iMarkerPtNum;++i)
{
g_lMarkerLayerID[i] = -1;
}
} }
CDlgMarker::~CDlgMarker() CDlgMarker::~CDlgMarker()
@ -106,9 +111,9 @@ void CDlgMarker::ShowMarkerCoordinate(double& markerLon, double& markerLat)
void CDlgMarker::OnBnClickedButtonAddMarker() void CDlgMarker::OnBnClickedButtonAddMarker()
{ {
//最多支持20个标记点 //最多支持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 ; return ;
} }

@ -13,6 +13,7 @@
#include "SetSaveLineID.h" #include "SetSaveLineID.h"
#include "CUtils.h" #include "CUtils.h"
//#include "8BMapDLL_type.h" //#include "8BMapDLL_type.h"
#include <fstream> #include <fstream>
@ -2593,7 +2594,7 @@ void CGISDlg::MouseDownMap1(short Button, short Shift, long x, long y)
m_CircleGuideLayer = m_map.NewDrawing(1); 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.DrawWideCircleEx(m_CircleGuideLayer,m_guidePtInfo.guidePtLon,m_guidePtInfo.guidePtLat,radius,RGB(248,252,55),false,2);
m_map.Redraw(); m_map.Redraw();
@ -7790,6 +7791,14 @@ void CGISDlg::ShowSaveZoneDlg(double* xPoints,double* yPoints)
OnShowGivenLine(filename); OnShowGivenLine(filename);
m_map.Redraw(); m_map.Redraw();
} }
else
{
if (m_tempZoneLayerID>=0)
{
m_map.RemoveLayer(m_tempZoneLayerID);
m_tempZoneLayerID = -1;
}
}
} }
@ -7864,12 +7873,14 @@ void CGISDlg::DrawRestrictedZone(long& layerID,double* xPoints,double* yPoints,i
if(type == 0){//ÏÞ·ÉÇø»ÆÉ« if(type == 0){//ÏÞ·ÉÇø»ÆÉ«
pShapeDrawingOption->LineColor = RGB(250,173,20); pShapeDrawingOption->LineColor = RGB(250,173,20);
pShapeDrawingOption->FillColor = RGB(254,252,233);//RGB(244,206,199); 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){ //½û·ÉÇøºìÉ« }else if(type==1){ //½û·ÉÇøºìÉ«
pShapeDrawingOption->LineColor = RGB(220,38,38); pShapeDrawingOption->LineColor = RGB(220,38,38);
pShapeDrawingOption->FillColor = RGB(254,243,243);//RGB(244,206,199); pShapeDrawingOption->FillColor = RGB(254,243,243);//RGB(244,206,199);
} }
pShapeDrawingOption->LineWidth = 2; pShapeDrawingOption->LineWidth = 2;
pShapeDrawingOption->FillTransparency = 180; //͸Ã÷¶È pShapeDrawingOption->FillTransparency = 60; //͸Ã÷¶È
(m_map.GetShapefile(layerID)).SetDefaultDrawingOptions(pShapeDrawingOption); (m_map.GetShapefile(layerID)).SetDefaultDrawingOptions(pShapeDrawingOption);
}; };

@ -260,7 +260,7 @@ extern long g_lDemPtNumLayerID[g_iDemAltPtNum];
extern bool g_bSelectMarker; extern bool g_bSelectMarker;
//最大支持的标记点数 //最大支持的标记点数
const int g_iMarkerPtNum = 20; const int g_iMarkerPtNum = 120;
//标记点图层 //标记点图层
extern long g_lMarkerLayerID[g_iMarkerPtNum]; extern long g_lMarkerLayerID[g_iMarkerPtNum];

Loading…
Cancel
Save