@rural-environmental-registry/map_component 1.0.0 → 1.2.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.
Files changed (71) hide show
  1. package/README.md +444 -0
  2. package/dist/constants/coordinatePanel.d.ts +1 -1
  3. package/dist/handlers/drawingControl.d.ts +0 -1
  4. package/dist/handlers/mapHandler.d.ts +8 -3
  5. package/dist/handlers/mapToolsHandler.d.ts +39 -0
  6. package/dist/handlers/measureToolsHandler.d.ts +51 -0
  7. package/dist/handlers/memorialButtonControl.d.ts +19 -0
  8. package/dist/handlers/toolsConstants.d.ts +3 -0
  9. package/dist/index.css +1 -1
  10. package/dist/index.d.ts +2 -0
  11. package/dist/index.mjs +32914 -25131
  12. package/dist/types/index.d.ts +69 -0
  13. package/dist/utils/areaCalculator.d.ts +3 -0
  14. package/dist/utils/drawingPathOptions.d.ts +8 -0
  15. package/dist/utils/geometryCalculator.d.ts +13 -0
  16. package/dist/utils/geometryFileParseResult.d.ts +8 -0
  17. package/dist/utils/memorialLayer.d.ts +3 -0
  18. package/dist/utils/menuHistory.d.ts +8 -0
  19. package/dist/utils/normalizeGeoJsonToFeatures.d.ts +2 -0
  20. package/dist/utils/parseGeoJsonFile.d.ts +2 -0
  21. package/dist/utils/parseKmlFile.d.ts +2 -0
  22. package/dist/utils/parseShapefileZip.d.ts +3 -0
  23. package/dist/utils/stableMarker.d.ts +15 -0
  24. package/dist/utils/validateImportedPolygonGeometry.d.ts +9 -0
  25. package/package.json +22 -4
  26. package/src/assets/icons/file-import-regular-full-gray.svg +1 -0
  27. package/src/assets/icons/file-lines-regular-full-gray.svg +1 -0
  28. package/src/assets/icons/layer-icon.svg +3 -0
  29. package/src/assets/icons/loading.gif +0 -0
  30. package/src/assets/icons/marker-icon.svg +1 -0
  31. package/src/assets/icons/measure-icon.svg +5 -0
  32. package/src/assets/layers/mapLayers.json +16 -0
  33. package/src/assets/main.css +187 -0
  34. package/src/assets/styles/element-plus.css +25 -0
  35. package/src/assets/styles/layers-menu.css +95 -0
  36. package/src/assets/styles/leaflet.css +361 -0
  37. package/src/components/MapDPG.vue +302 -0
  38. package/src/components/coordinate/CoordinatePanel.vue +1206 -0
  39. package/src/components/fa-icon/FontAwesomeIcon.vue +44 -0
  40. package/src/components/loading/Loading.vue +25 -0
  41. package/src/components/map/LeafletMap.vue +183 -0
  42. package/src/components/menu/ChildMenu.vue +112 -0
  43. package/src/components/menu/LayerMenu.vue +294 -0
  44. package/src/components/menu/ParentMenu.vue +132 -0
  45. package/src/constants/coordinatePanel.ts +68 -0
  46. package/src/handlers/constants.ts +35 -0
  47. package/src/handlers/drawingControl.ts +143 -0
  48. package/src/handlers/mapHandler.ts +124 -0
  49. package/src/handlers/mapToolsHandler.ts +281 -0
  50. package/src/handlers/measureToolsHandler.ts +424 -0
  51. package/src/handlers/memorialButtonControl.ts +171 -0
  52. package/src/handlers/toolsConstants.ts +69 -0
  53. package/src/index.ts +6 -0
  54. package/src/shims-vue.d.ts +5 -0
  55. package/src/types/index.ts +260 -0
  56. package/src/types/json.d.ts +4 -0
  57. package/src/types/shpjs.d.ts +7 -0
  58. package/src/types/svg.d.ts +4 -0
  59. package/src/utils/CoordinateConverter.ts +43 -0
  60. package/src/utils/areaCalculator.ts +9 -0
  61. package/src/utils/drawingPathOptions.ts +57 -0
  62. package/src/utils/geometryCalculator.ts +62 -0
  63. package/src/utils/geometryFileParseResult.ts +5 -0
  64. package/src/utils/memorialLayer.ts +7 -0
  65. package/src/utils/menuHistory.ts +71 -0
  66. package/src/utils/normalizeGeoJsonToFeatures.ts +52 -0
  67. package/src/utils/parseGeoJsonFile.ts +23 -0
  68. package/src/utils/parseKmlFile.ts +31 -0
  69. package/src/utils/parseShapefileZip.ts +29 -0
  70. package/src/utils/stableMarker.ts +52 -0
  71. package/src/utils/validateImportedPolygonGeometry.ts +62 -0
@@ -50,6 +50,12 @@ export type BaseMapLayer = {
50
50
  key: string;
51
51
  default: boolean;
52
52
  url: string;
53
+ tms?: boolean;
54
+ minZoom?: number;
55
+ maxZoom?: number;
56
+ maxNativeZoom?: number;
57
+ errorTileUrl?: string;
58
+ minZoomWarning?: number | null;
53
59
  };
54
60
  export type BaseMapLayers = BaseMapLayer[];
55
61
  export type MapLayers = {
@@ -60,6 +66,8 @@ export type MapConfigConfig = MapOptions & {
60
66
  id: string;
61
67
  removeControlLayers?: boolean;
62
68
  zoomControlPosition?: ControlPosition;
69
+ /** Reposiciona marcadores após zoom (evita drift de divIcon). Padrão: true. */
70
+ stabilizeMarkersOnZoom?: boolean;
63
71
  };
64
72
  export type MapConfig = {
65
73
  config?: MapConfigConfig;
@@ -67,16 +75,71 @@ export type MapConfig = {
67
75
  export type LayersMenuConfig = {
68
76
  size: 'small' | 'medium' | 'large';
69
77
  removeMenu?: boolean;
78
+ persist: boolean;
70
79
  };
71
80
  export type MemorialConfig = {
72
81
  show: boolean;
73
82
  config?: any;
74
83
  controlTexts?: any;
75
84
  };
85
+ export type MapToolsConfig = {
86
+ show?: boolean;
87
+ position?: ControlPosition;
88
+ zoom?: {
89
+ show?: boolean;
90
+ titleIn?: string;
91
+ titleOut?: string;
92
+ };
93
+ fullscreen?: {
94
+ show?: boolean;
95
+ title?: string;
96
+ };
97
+ center?: {
98
+ show?: boolean;
99
+ title?: string;
100
+ target?: 'drawn' | 'initial';
101
+ padding?: [number, number];
102
+ };
103
+ measureArea?: {
104
+ show?: boolean;
105
+ title?: string;
106
+ shapeOptions?: PathOptions;
107
+ };
108
+ measureLine?: {
109
+ show?: boolean;
110
+ title?: string;
111
+ };
112
+ measurePolygon?: {
113
+ show?: boolean;
114
+ title?: string;
115
+ };
116
+ texts?: {
117
+ measureResult?: string;
118
+ measureLength?: string;
119
+ measureArea?: string;
120
+ measureCancel?: string;
121
+ measureFinish?: string;
122
+ measurePanelTitle?: string;
123
+ measureLineTitle?: string;
124
+ measurePolygonTitle?: string;
125
+ measureLineHelp?: string;
126
+ measurePolygonHelp?: string;
127
+ noGeometry?: string;
128
+ };
129
+ };
130
+ export type MeasureCompleteEvent = {
131
+ m2?: number;
132
+ km2?: number;
133
+ ha?: number;
134
+ lengthM?: number;
135
+ lengthKm?: number;
136
+ geojson: GeoJsonObject;
137
+ };
76
138
  export type MapOptionsConfig = {
77
139
  layersMenu?: LayersMenuConfig;
78
140
  map: MapConfig;
79
141
  drawing?: DrawingConfig;
142
+ tools?: MapToolsConfig;
80
143
  };
81
144
  export type DrawingConfig = DrawingControlOptions & DisplayDrawingControl;
82
145
  export type TranslationConfig = {
@@ -143,6 +206,12 @@ export type CoordinatePanelTexts = {
143
206
  dragCsvFile?: string;
144
207
  csvColumnsInfo?: string;
145
208
  applyCsvCoordinates?: string;
209
+ shapefileUpload?: string;
210
+ shapefileFileUpload?: string;
211
+ dragShapefileZip?: string;
212
+ shapefileZipInfo?: string;
213
+ shapefileAppliedSuccess?: string;
214
+ geometryImportUnsupportedFormat?: string;
146
215
  placeholderLongitude?: string;
147
216
  placeholderLatitude?: string;
148
217
  placeholderAzimuth?: string;
@@ -0,0 +1,3 @@
1
+ import { calculateLayerArea, formatAreaHa } from './geometryCalculator';
2
+ export { calculateLayerArea, formatAreaHa };
3
+ export declare function formatAreaValue(value: number, unit: 'ha' | 'm2' | 'km2'): string;
@@ -0,0 +1,8 @@
1
+ import type { Map, PathOptions } from 'leaflet';
2
+ import type { DrawingConfig } from '../types';
3
+ export type MemorialDrawShape = 'polygon' | 'polyline';
4
+ /**
5
+ * Resolve estilos de desenho para geometrias do memorial.
6
+ * Prioridade: opções ativas do Geoman (camada selecionada) → config estática → padrão.
7
+ */
8
+ export declare function resolveDrawingPathOptions(map: Map | undefined, drawingConfig: DrawingConfig | undefined, shape: MemorialDrawShape): PathOptions;
@@ -0,0 +1,13 @@
1
+ import { Layer } from 'leaflet';
2
+ import { DrawnArea } from '../types';
3
+ export declare function isClosedPolygonLayer(layer: Layer): boolean;
4
+ export declare function calculateLayerArea(layer: Layer): DrawnArea;
5
+ export declare function calculateLayerLength(layer: Layer): {
6
+ m: number;
7
+ km: number;
8
+ };
9
+ export declare function formatLengthKm(km: number): string;
10
+ export declare function formatAreaKm2(km2: number): string;
11
+ export declare function formatAreaHa(value: number): string;
12
+ export declare function formatLengthValue(value: number, unit: 'm' | 'km'): string;
13
+ export { formatAreaHa as formatAreaValue };
@@ -0,0 +1,8 @@
1
+ import type { Feature } from 'geojson';
2
+ export type GeometryFileParseResult = {
3
+ ok: true;
4
+ features: Feature[];
5
+ } | {
6
+ ok: false;
7
+ error: string;
8
+ };
@@ -0,0 +1,3 @@
1
+ import type L from 'leaflet';
2
+ export declare const MEMORIAL_KEY = "memorial";
3
+ export declare function isMemorialLayer(layer: L.Layer): boolean;
@@ -0,0 +1,8 @@
1
+ import { LayerData } from '../types';
2
+ export declare const setHistory: (layer: LayerData) => void;
3
+ /** Retorna o estado salvo da camada ou `undefined` se não houver histórico. */
4
+ export declare const getHistory: (layerKey: string) => boolean | undefined;
5
+ /** Resolve `active`/`activeDefault` sem mutar o objeto original (mesma regra do fluxo legado). */
6
+ export declare const resolveLayerActiveState: (layer: LayerData, persist: boolean) => LayerData;
7
+ /** Indica se a camada deve ser aplicada ao mapa na inicialização. */
8
+ export declare const shouldInitLayerOnMap: (layer: LayerData, persist: boolean) => boolean;
@@ -0,0 +1,2 @@
1
+ import type { Feature } from 'geojson';
2
+ export declare function normalizeGeoJsonToFeatures(geojson: unknown): Feature[];
@@ -0,0 +1,2 @@
1
+ import type { GeometryFileParseResult } from './geometryFileParseResult';
2
+ export declare function parseGeoJsonFile(file: File): Promise<GeometryFileParseResult>;
@@ -0,0 +1,2 @@
1
+ import type { GeometryFileParseResult } from './geometryFileParseResult';
2
+ export declare function parseKmlFile(file: File): Promise<GeometryFileParseResult>;
@@ -0,0 +1,3 @@
1
+ import type { GeometryFileParseResult } from './geometryFileParseResult';
2
+ export type ShapefileParseResult = GeometryFileParseResult;
3
+ export declare function parseShapefileZip(file: File): Promise<ShapefileParseResult>;
@@ -0,0 +1,15 @@
1
+ import type { FeatureGroup, LatLngExpression, Map, Marker, MarkerOptions } from 'leaflet';
2
+ import type { default as LeafletType } from 'leaflet';
3
+ export type StableMarkerOptions = MarkerOptions & Record<string, unknown>;
4
+ /** Opções padrão para evitar drift de divIcon durante zoom no Leaflet. */
5
+ export declare const STABLE_MARKER_DEFAULTS: StableMarkerOptions;
6
+ /**
7
+ * Cria marcador com opções estáveis para ícones customizados (divIcon).
8
+ * Consumidores podem passar `icon` e metadados de domínio (ex.: layerCode, rules).
9
+ */
10
+ export declare function createStableMarker(leaflet: typeof LeafletType, latlng: LatLngExpression, options?: StableMarkerOptions): Marker;
11
+ /**
12
+ * Reposiciona marcadores após zoom (workaround para desalinhamento de divIcon).
13
+ * Retorna função de cleanup para remover o listener.
14
+ */
15
+ export declare function bindMarkerZoomStability(map: Map, layerGroup: FeatureGroup): () => void;
@@ -0,0 +1,9 @@
1
+ import type { Feature, MultiPolygon, Polygon } from 'geojson';
2
+ export type ImportedPolygonValidationResult = {
3
+ ok: true;
4
+ feature: Feature<Polygon | MultiPolygon>;
5
+ } | {
6
+ ok: false;
7
+ error: string;
8
+ };
9
+ export declare function validateImportedPolygonGeometry(features: Feature[]): ImportedPolygonValidationResult;
package/package.json CHANGED
@@ -1,20 +1,32 @@
1
1
  {
2
2
  "name": "@rural-environmental-registry/map_component",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Map component for Vue.js applications",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
+ "artifactId": "dpg-mapa",
8
9
  "scripts": {
9
10
  "dev": "vite build --watch",
10
11
  "build": "vite build && tsc",
11
- "prepublishOnly": "npm run build"
12
+ "prepublishOnly": "npm run build",
13
+ "format": "prettier --write ./src"
12
14
  },
13
15
  "files": [
14
16
  "dist",
17
+ "src",
18
+ "index.html",
19
+ "package.json",
20
+ "vite.config.js",
15
21
  "README.md"
16
22
  ],
17
- "keywords": ["vue", "map", "leaflet", "component", "dataprev"],
23
+ "keywords": [
24
+ "vue",
25
+ "map",
26
+ "leaflet",
27
+ "component",
28
+ "dataprev"
29
+ ],
18
30
  "author": "Dataprev",
19
31
  "license": "GPL-3.0",
20
32
  "repository": {
@@ -34,13 +46,19 @@
34
46
  "element-plus": "2.9.3",
35
47
  "leaflet": "1.9.4",
36
48
  "leaflet-draw": "1.0.4",
37
- "papaparse": "5.5.3"
49
+ "papaparse": "5.5.3",
50
+ "shpjs": "6.1.0",
51
+ "@tmcw/togeojson": "7.1.2"
38
52
  },
39
53
  "devDependencies": {
40
54
  "@types/geojson": "7946.0.16",
41
55
  "@types/leaflet": "1.9.16",
42
56
  "@types/papaparse": "5.3.16",
43
57
  "@vitejs/plugin-vue": "5.2.1",
58
+ "element-plus": "2.9.3",
59
+ "leaflet": "1.9.4",
60
+ "leaflet-draw": "1.0.4",
61
+ "papaparse": "5.5.3",
44
62
  "typescript": "5.7.3",
45
63
  "unplugin-element-plus": "0.9.1",
46
64
  "vite": "6.3.5",
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="64 64 512 512"><path fill="#595959" d="M192 112L304 112L304 200C304 239.8 336.2 272 376 272L464 272L464 512C464 520.8 456.8 528 448 528L192 528C183.2 528 176 520.8 176 512L176 128C176 119.2 183.2 112 192 112zM352 131.9L444.1 224L376 224C362.7 224 352 213.3 352 200L352 131.9zM192 64C156.7 64 128 92.7 128 128L128 512C128 547.3 156.7 576 192 576L448 576C483.3 576 512 547.3 512 512L512 250.5C512 233.5 505.3 217.2 493.3 205.2L370.7 82.7C358.7 70.7 342.5 64 325.5 64L192 64zM389 320L325 384L325 288L251 288C237.7 288 227 298.7 227 312C227 325.3 237.7 336 251 336L325 336L325 240L389 304C398.4 313.4 413.6 313.4 423 304C432.4 294.6 432.4 279.4 423 270L359 206C349.6 196.6 334.4 196.6 325 206C315.6 215.4 315.6 230.6 325 240L389 304L389 320z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="64 64 512 512"><path fill="#595959" d="M192 112L304 112L304 200C304 239.8 336.2 272 376 272L464 272L464 512C464 520.8 456.8 528 448 528L192 528C183.2 528 176 520.8 176 512L176 128C176 119.2 183.2 112 192 112zM352 131.9L444.1 224L376 224C362.7 224 352 213.3 352 200L352 131.9zM192 64C156.7 64 128 92.7 128 128L128 512C128 547.3 156.7 576 192 576L448 576C483.3 576 512 547.3 512 512L512 250.5C512 233.5 505.3 217.2 493.3 205.2L370.7 82.7C358.7 70.7 342.5 64 325.5 64L192 64zM248 320C234.7 320 224 330.7 224 344C224 357.3 234.7 368 248 368L392 368C405.3 368 416 357.3 416 344C416 330.7 405.3 320 392 320L248 320zM248 416C234.7 416 224 426.7 224 440C224 453.3 234.7 464 248 464L392 464C405.3 464 416 453.3 416 440C416 426.7 405.3 416 392 416L248 416z"/></svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">
2
+ <path fill="#5b5b5b" d="M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 209.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2zm-152 198.2l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z"/>
3
+ </svg>
Binary file
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 1024 1024" class="icon" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="#3acb5e" stroke="#3acb5e"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M512 85.333333c-164.949333 0-298.666667 133.738667-298.666667 298.666667 0 164.949333 298.666667 554.666667 298.666667 554.666667s298.666667-389.717333 298.666667-554.666667c0-164.928-133.717333-298.666667-298.666667-298.666667z m0 448a149.333333 149.333333 0 1 1 0-298.666666 149.333333 149.333333 0 0 1 0 298.666666z" fill="#45b625"></path></g></svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#5b5b5b" stroke-width="2" stroke-linecap="round">
2
+ <path d="M3 21l18-18"/>
3
+ <circle cx="7" cy="7" r="1.5" fill="#5b5b5b" stroke="none"/>
4
+ <circle cx="17" cy="17" r="1.5" fill="#5b5b5b" stroke="none"/>
5
+ </svg>
@@ -0,0 +1,16 @@
1
+ {
2
+ "mapLayers": [
3
+ {
4
+ "name": "Esri Imagery",
5
+ "default": true,
6
+ "key": "esri",
7
+ "url": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"
8
+ },
9
+ {
10
+ "name": "OpenStreetMap",
11
+ "default": false,
12
+ "key": "osm",
13
+ "url": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,187 @@
1
+ @import './styles/leaflet.css';
2
+ @import './styles/element-plus.css';
3
+ @import './styles/layers-menu.css';
4
+
5
+ :root {
6
+ --mapa-base-green: #42916e;
7
+ --mapa-base-white: #ffffff;
8
+ --mapa-base-black: #333333;
9
+ --mapa-base-gray: #5b5b5b;
10
+ --mapa-base-shadow: rgba(0, 0, 0, 0.05);
11
+ --mapa-base-backdrop: rgba(108, 117, 125, 0.5);
12
+
13
+ --mapa-base-radius-5: 5px;
14
+ --mapa-base-radius-10: 10px;
15
+
16
+ --mapa-fs-12: 0.75rem;
17
+ --mapa-fs-15: 0.938rem;
18
+ --mapa-fs-22: 1.375rem;
19
+
20
+ --mapa-size-base-1: 1px;
21
+ --mapa-size-base-2: 2px;
22
+ --mapa-size-base-5: 5px;
23
+ --mapa-size-base-8: 8px;
24
+ --mapa-size-base-10: 10px;
25
+ --mapa-size-base-15: 15px;
26
+ --mapa-size-base-18: 18px;
27
+ --mapa-size-base-20: 20px;
28
+ --mapa-size-base-30: 32px;
29
+ --mapa-size-base-35: 35px;
30
+ --mapa-size-base-40: 40px;
31
+
32
+ --mapa-base-box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
33
+ --mapa-base-transition: all 0.3s ease-in-out;
34
+
35
+ /* Menu sizes */
36
+
37
+ --mapa-menu-small-width: 300px;
38
+ --mapa-menu-medium-width: 400px;
39
+ --mapa-menu-large-width: 600px;
40
+
41
+ --mapa-parent-menu-small-width: 155px;
42
+ --mapa-parent-menu-medium-width: 205px;
43
+ --mapa-parent-menu-large-width: 305px;
44
+
45
+ --mapa-child-menu-small-width: 185px;
46
+ --mapa-child-menu-medium-width: 235px;
47
+ --mapa-child-menu-large-width: 335px;
48
+ }
49
+
50
+ .leaflet-control-memorial {
51
+ display: flex;
52
+ flex-direction: column;
53
+ background-color: var(--mapa-base-white);
54
+ border-radius: var(--mapa-base-radius-10);
55
+ box-shadow: var(--mapa-base-box-shadow);
56
+ border: none !important;
57
+ width: var(--mapa-size-base-30);
58
+ min-width: var(--mapa-size-base-30);
59
+ height: auto;
60
+ overflow: hidden;
61
+ box-sizing: border-box;
62
+ }
63
+
64
+ .leaflet-control-memorial.leaflet-bar {
65
+ border: none;
66
+ }
67
+
68
+ .memorial-btn {
69
+ display: flex;
70
+ align-items: center;
71
+ justify-content: center;
72
+ padding: 0;
73
+ margin: 0;
74
+ border: none;
75
+ background: transparent;
76
+ width: var(--mapa-size-base-30);
77
+ height: var(--mapa-size-base-30);
78
+ min-width: var(--mapa-size-base-30);
79
+ min-height: var(--mapa-size-base-30);
80
+ border-radius: var(--mapa-base-radius-10);
81
+ cursor: pointer;
82
+ line-height: 0;
83
+ box-sizing: border-box;
84
+ }
85
+
86
+ .memorial-btn:hover {
87
+ background-color: #f4f4f4;
88
+ }
89
+
90
+ .memorial-btn img {
91
+ width: var(--map-control-icon-size, var(--mapa-size-base-20));
92
+ height: var(--map-control-icon-size, var(--mapa-size-base-20));
93
+ max-width: var(--map-control-icon-size, var(--mapa-size-base-20));
94
+ max-height: var(--map-control-icon-size, var(--mapa-size-base-20));
95
+ display: block;
96
+ object-fit: contain;
97
+ margin: 0;
98
+ pointer-events: none;
99
+ flex-shrink: 0;
100
+ transform: translateX(1px);
101
+ }
102
+
103
+ .leaflet-control-map-tools {
104
+ display: flex;
105
+ flex-direction: column;
106
+ background: transparent;
107
+ border: none;
108
+ border-radius: var(--mapa-base-radius-10);
109
+ overflow: hidden;
110
+ box-shadow: var(--mapa-base-box-shadow);
111
+ width: var(--mapa-size-base-30);
112
+ box-sizing: border-box;
113
+ }
114
+
115
+ .leaflet-control-map-tools .map-tools-btn {
116
+ display: flex;
117
+ align-items: center;
118
+ justify-content: center;
119
+ width: var(--mapa-size-base-30);
120
+ height: var(--mapa-size-base-30);
121
+ padding: 0;
122
+ border: none;
123
+ background-color: var(--mapa-base-white);
124
+ color: var(--mapa-base-gray);
125
+ cursor: pointer;
126
+ transition: var(--mapa-base-transition);
127
+ line-height: 1;
128
+ }
129
+
130
+ .leaflet-control-map-tools .map-tools-btn:first-child {
131
+ border-top-left-radius: var(--mapa-base-radius-10);
132
+ border-top-right-radius: var(--mapa-base-radius-10);
133
+ }
134
+
135
+ .leaflet-control-map-tools .map-tools-btn:last-child {
136
+ border-bottom-left-radius: var(--mapa-base-radius-10);
137
+ border-bottom-right-radius: var(--mapa-base-radius-10);
138
+ }
139
+
140
+ .leaflet-control-map-tools .map-tools-btn:not(:last-child) {
141
+ border-bottom: var(--mapa-size-base-1) solid rgba(0, 0, 0, 0.08);
142
+ }
143
+
144
+ .leaflet-control-map-tools .map-tools-btn:hover {
145
+ background-color: #f4f4f4;
146
+ color: var(--mapa-base-black);
147
+ }
148
+
149
+ .leaflet-control-map-tools .map-tools-btn--active {
150
+ background-color: var(--mapa-base-green);
151
+ color: var(--mapa-base-white);
152
+ }
153
+
154
+ .leaflet-control-map-tools .map-tools-btn svg {
155
+ display: block;
156
+ flex-shrink: 0;
157
+ width: var(--map-control-icon-size, var(--mapa-size-base-20));
158
+ height: var(--map-control-icon-size, var(--mapa-size-base-20));
159
+ }
160
+
161
+ .leaflet-control-map-tools .map-tools-btn--zoom-in,
162
+ .leaflet-control-map-tools .map-tools-btn--zoom-out {
163
+ font-size: var(--mapa-fs-22);
164
+ font-weight: 400;
165
+ line-height: 1;
166
+ }
167
+
168
+ /* Marcadores divIcon (ex.: Property Headquarter) — anchor alinhado ao iconSize 32×32 */
169
+ .leaflet-marker-icon.rer-map-marker-icon {
170
+ background: transparent !important;
171
+ border: none !important;
172
+ width: 32px !important;
173
+ height: 32px !important;
174
+ margin-left: -16px !important;
175
+ margin-top: -16px !important;
176
+ }
177
+
178
+ .rer-map-marker-icon__inner {
179
+ display: flex;
180
+ align-items: center;
181
+ justify-content: center;
182
+ width: 32px;
183
+ height: 32px;
184
+ font-size: 16px;
185
+ line-height: 1;
186
+ pointer-events: none;
187
+ }
@@ -0,0 +1,25 @@
1
+ @import 'element-plus/dist/index.css';
2
+
3
+ .map-container {
4
+ .el-switch.is-checked .el-switch__core {
5
+ background: var(--mapa-base-green) !important;
6
+ border-color: var(--mapa-base-green) !important;
7
+ }
8
+
9
+ .el-switch.is-checked .el-switch__core .el-switch__action {
10
+ color: var(--mapa-base-green) !important;
11
+ }
12
+
13
+ .el-sub-menu__title:hover,
14
+ .el-menu-item:hover {
15
+ background-color: var(--mapa-base-shadow) !important;
16
+ }
17
+
18
+ .el-menu-item.is-active {
19
+ color: var(--mapa-base-black) !important;
20
+ }
21
+
22
+ .el-switch__input:focus-visible ~ .el-switch__core {
23
+ outline-color: var(--mapa-base-green) !important;
24
+ }
25
+ }
@@ -0,0 +1,95 @@
1
+ .layer-menu.layer-menu-small {
2
+ .map-custom-menu {
3
+ width: var(--mapa-menu-small-width);
4
+
5
+ &.map-custom-menu-open {
6
+ left: 0;
7
+ }
8
+
9
+ &.map-custom-menu-close {
10
+ left: calc(var(--mapa-menu-small-width) * -1);
11
+ }
12
+ }
13
+
14
+ .map-menu-button {
15
+ &.map-menu-button-open {
16
+ left: var(--mapa-menu-small-width);
17
+ }
18
+
19
+ &.map-menu-button-close {
20
+ left: 0;
21
+ }
22
+ }
23
+
24
+ .parent-menu .parent-layer-title {
25
+ width: var(--mapa-parent-menu-small-width);
26
+ }
27
+
28
+ .child-menu .child-layer-title {
29
+ width: var(--mapa-child-menu-small-width);
30
+ }
31
+ }
32
+
33
+ .layer-menu.layer-menu-medium {
34
+ .map-custom-menu {
35
+ width: var(--mapa-menu-medium-width);
36
+
37
+ &.map-custom-menu-open {
38
+ left: 0;
39
+ }
40
+
41
+ &.map-custom-menu-close {
42
+ left: calc(var(--mapa-menu-medium-width) * -1);
43
+ }
44
+ }
45
+
46
+ .map-menu-button {
47
+ &.map-menu-button-open {
48
+ left: var(--mapa-menu-medium-width);
49
+ }
50
+
51
+ &.map-menu-button-close {
52
+ left: 0;
53
+ }
54
+ }
55
+
56
+ .parent-menu .parent-layer-title {
57
+ width: var(--mapa-parent-menu-medium-width);
58
+ }
59
+
60
+ .child-menu .child-layer-title {
61
+ width: var(--mapa-child-menu-medium-width);
62
+ }
63
+ }
64
+
65
+ .layer-menu.layer-menu-large {
66
+ .map-custom-menu {
67
+ width: var(--mapa-menu-large-width);
68
+
69
+ &.map-custom-menu-open {
70
+ left: 0;
71
+ }
72
+
73
+ &.map-custom-menu-close {
74
+ left: calc(var(--mapa-menu-large-width) * -1);
75
+ }
76
+ }
77
+
78
+ .map-menu-button {
79
+ &.map-menu-button-open {
80
+ left: var(--mapa-menu-large-width);
81
+ }
82
+
83
+ &.map-menu-button-close {
84
+ left: 0;
85
+ }
86
+ }
87
+
88
+ .parent-menu .parent-layer-title {
89
+ width: var(--mapa-parent-menu-large-width);
90
+ }
91
+
92
+ .child-menu .child-layer-title {
93
+ width: var(--mapa-child-menu-large-width);
94
+ }
95
+ }