Hi, Everyone, good afternoon.
I tried to load and remove layer.
But after remove layer(ex DEM) then the map removed together.
Please let me know how to remain the map after removelayer(DEM).
Thank you.
below are code and result images
-
Load map
axMap1.TileProvider = tkTileProvider.OpenHumanitarianMap;
axMap1.CursorMode = tkCursorMode.cmPan;
axMap1.Projection = tkMapProjection.PROJECTION_GOOGLE_MERCATOR;
axMap1.KnownExtents = tkKnownExtents.keSouth_Korea;
axMap1.ZoomBarMaxZoom = 15;
axMap1.ZoomBarMinZoom = 7;
axMap1.CurrentZoom = 7;
-
Load Image
string demFileName = ofd.FileName;
MapWinGIS.Image mydem = new MapWinGIS.Image();
mydem.Open(demFileName);
demlayerHandler = axMap1.AddLayer(mydem, true);
-
RemoveLayer
axMap1.RemoveLayer(demlayerHandler);