@rural-environmental-registry/map_component 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/dist/constants/coordinatePanel.d.ts +2 -0
- package/dist/handlers/constants.d.ts +3 -0
- package/dist/handlers/drawingControl.d.ts +22 -0
- package/dist/handlers/mapHandler.d.ts +16 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +31321 -0
- package/dist/types/index.d.ts +162 -0
- package/dist/utils/CoordinateConverter.d.ts +16 -0
- package/package.json +49 -0
- package/readme.md +215 -0
- package/readme.ptbr.md +215 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Map, FeatureGroup } from 'leaflet';
|
|
2
|
+
import '@geoman-io/leaflet-geoman-free';
|
|
3
|
+
import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css';
|
|
4
|
+
import { DrawingConfig, ToolbarOptions } from '../types';
|
|
5
|
+
export default class DrawingControlHandler {
|
|
6
|
+
private readonly _map;
|
|
7
|
+
private readonly _drawItemsGroup;
|
|
8
|
+
private readonly _options;
|
|
9
|
+
constructor(map: Map, drawItemsGroup: FeatureGroup, controlOptions?: DrawingConfig);
|
|
10
|
+
get drawItemsGroup(): FeatureGroup;
|
|
11
|
+
get map(): Map;
|
|
12
|
+
get options(): ToolbarOptions;
|
|
13
|
+
private calculateAreas;
|
|
14
|
+
private incrementLayerInfos;
|
|
15
|
+
handleDrawingEvents(eventEmitterCallback: Function): void;
|
|
16
|
+
private handleUpdateDrawingEvents;
|
|
17
|
+
private handleDeleteDrawingEvents;
|
|
18
|
+
private addTranslation;
|
|
19
|
+
private formatMenuOptions;
|
|
20
|
+
private applyShapeStyles;
|
|
21
|
+
private setMartkerIcon;
|
|
22
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MapLayers, MapConfigConfig } from '../types';
|
|
2
|
+
import L from 'leaflet';
|
|
3
|
+
export default class MapHandler {
|
|
4
|
+
private readonly _map;
|
|
5
|
+
private readonly _mapOptions;
|
|
6
|
+
private _mapLayers;
|
|
7
|
+
private _layerControl;
|
|
8
|
+
constructor(mapOptions: MapConfigConfig | undefined);
|
|
9
|
+
get map(): L.Map;
|
|
10
|
+
get layerControl(): L.Control.Layers;
|
|
11
|
+
private addControls;
|
|
12
|
+
private addBaseLayer;
|
|
13
|
+
private disableLayerControlHover;
|
|
14
|
+
private watchLayerStatus;
|
|
15
|
+
init(mapLayers: MapLayers, eventEmitterCallback: Function): void;
|
|
16
|
+
}
|