private static void OnExentCreated(MapInterActionHandler s, LayerEventArg e) { if (EnableMapInteraction) { if (_hAOI >= 0) { MapWindowManager.MapLayersHandler.RemoveLayer(_hAOI); } else { AOIName = "New AOI"; } _sfAOI = new Shapefile(); if (_sfAOI.CreateNewWithShapeID("", ShpfileType.SHP_POLYGON)) { if (_sfAOI.EditAddShape(e.SelectionExtent.ToShape()) >= 0) { _hAOI = MapWindowManager.MapLayersHandler.AddLayer(_sfAOI, AOIName); if (_hAOI >= 0) { var fldName = _sfAOI.EditAddField("Name", FieldType.STRING_FIELD, 1, 1); _sfAOI.Key = "aoi"; FormatAOI(_sfAOI); } } } } }
public static void Cleanup() { Entities.TripViewModel.MarkAllNotShownInMap(); _mapInterActionHandler.ShapesSelected -= _mapInterActionHandler_ShapesSelected; _mapInterActionHandler = null; }
private static void _mapInterActionHandler_ShapesSelected(MapInterActionHandler s, LayerEventArg e) { }