react-native-map4d-map-dtqg 0.1.4 → 0.1.6
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/README.md +58 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/build.gradle +23 -2
- package/android/src/main/java/com/reactnativemap4dmap/Map4dMapModule.java +39 -27
- package/ios/Map4dMap.h +12 -3
- package/ios/Map4dMap.m +108 -3
- package/ios/Map4dMapTurbo.mm +16 -0
- package/ios/RMFCircleManager.m +40 -68
- package/ios/RMFDirectionsRendererManager.m +26 -24
- package/ios/RMFMapViewManager.m +64 -149
- package/ios/RMFMarkerManager.m +36 -64
- package/ios/RMFPOIManager.m +40 -74
- package/ios/RMFPolygonManager.m +38 -60
- package/ios/RMFPolylineManager.m +36 -58
- package/ios/building/RMFBuildingManager.m +36 -64
- package/lib/commonjs/components/MFBanDoSo/constants.js +30 -0
- package/lib/commonjs/components/MFBanDoSo/constants.js.map +1 -0
- package/lib/commonjs/components/MFBanDoSo/helpers.js +200 -0
- package/lib/commonjs/components/MFBanDoSo/helpers.js.map +1 -0
- package/lib/commonjs/components/MFBanDoSo/propTypes.js +18 -0
- package/lib/commonjs/components/MFBanDoSo/propTypes.js.map +1 -0
- package/lib/commonjs/components/MFBanDoSo/styles.js +334 -0
- package/lib/commonjs/components/MFBanDoSo/styles.js.map +1 -0
- package/lib/commonjs/components/MFBanDoSo/ui.js +231 -0
- package/lib/commonjs/components/MFBanDoSo/ui.js.map +1 -0
- package/lib/commonjs/components/MFBanDoSo.js +201 -73
- package/lib/commonjs/components/MFBanDoSo.js.map +1 -1
- package/lib/commonjs/components/MFBuilding.js +15 -90
- package/lib/commonjs/components/MFBuilding.js.map +1 -1
- package/lib/commonjs/components/MFCircle.js +20 -88
- package/lib/commonjs/components/MFCircle.js.map +1 -1
- package/lib/commonjs/components/MFDirectionsRenderer.js +15 -93
- package/lib/commonjs/components/MFDirectionsRenderer.js.map +1 -1
- package/lib/commonjs/components/MFMapView.js +50 -147
- package/lib/commonjs/components/MFMapView.js.map +1 -1
- package/lib/commonjs/components/MFMarker.js +15 -101
- package/lib/commonjs/components/MFMarker.js.map +1 -1
- package/lib/commonjs/components/MFPOI.js +17 -92
- package/lib/commonjs/components/MFPOI.js.map +1 -1
- package/lib/commonjs/components/MFPolygon.js +15 -87
- package/lib/commonjs/components/MFPolygon.js.map +1 -1
- package/lib/commonjs/components/MFPolyline.js +17 -87
- package/lib/commonjs/components/MFPolyline.js.map +1 -1
- package/lib/commonjs/components/MFTileOverlay.js +7 -15
- package/lib/commonjs/components/MFTileOverlay.js.map +1 -1
- package/lib/commonjs/components/Map4dMapView.js +1 -4
- package/lib/commonjs/components/Map4dMapView.js.map +1 -1
- package/lib/commonjs/components/extends/AreaFocusManager.js +4 -38
- package/lib/commonjs/components/extends/AreaFocusManager.js.map +1 -1
- package/lib/commonjs/components/extends/AreaFocuser.js +1 -17
- package/lib/commonjs/components/extends/AreaFocuser.js.map +1 -1
- package/lib/commonjs/components/extends/BoundHelper.js +0 -6
- package/lib/commonjs/components/extends/BoundHelper.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusAreas.js +0 -37
- package/lib/commonjs/components/extends/area/AreaFocusAreas.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusGeometryUtils.js +1 -35
- package/lib/commonjs/components/extends/area/AreaFocusGeometryUtils.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusSession.js +0 -18
- package/lib/commonjs/components/extends/area/AreaFocusSession.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusTypes.js +2 -3
- package/lib/commonjs/components/extends/area/AreaFocusTypes.js.map +1 -1
- package/lib/commonjs/components/internal/DefaultRoadmapStyle.js +1 -2
- package/lib/commonjs/components/internal/DefaultRoadmapStyle.js.map +1 -1
- package/lib/commonjs/components/internal/GeojsonStyleUtils.js +20 -31
- package/lib/commonjs/components/internal/GeojsonStyleUtils.js.map +1 -1
- package/lib/commonjs/index.js +0 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/native/Map4dMapNativeModule.js +10 -0
- package/lib/commonjs/native/Map4dMapNativeModule.js.map +1 -0
- package/lib/commonjs/native/NativeModuleResolver.js +35 -0
- package/lib/commonjs/native/NativeModuleResolver.js.map +1 -0
- package/lib/commonjs/native/ViewManagerCommand.js +67 -0
- package/lib/commonjs/native/ViewManagerCommand.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/specs/NativeMap4dMap.js +9 -0
- package/lib/commonjs/specs/NativeMap4dMap.js.map +1 -0
- package/lib/module/components/MFBanDoSo/constants.js +25 -0
- package/lib/module/components/MFBanDoSo/constants.js.map +1 -0
- package/lib/module/components/MFBanDoSo/helpers.js +188 -0
- package/lib/module/components/MFBanDoSo/helpers.js.map +1 -0
- package/lib/module/components/MFBanDoSo/propTypes.js +14 -0
- package/lib/module/components/MFBanDoSo/propTypes.js.map +1 -0
- package/lib/module/components/MFBanDoSo/styles.js +332 -0
- package/lib/module/components/MFBanDoSo/styles.js.map +1 -0
- package/lib/module/components/MFBanDoSo/ui.js +224 -0
- package/lib/module/components/MFBanDoSo/ui.js.map +1 -0
- package/lib/module/components/MFBanDoSo.js +203 -63
- package/lib/module/components/MFBanDoSo.js.map +1 -1
- package/lib/module/components/MFBuilding.js +17 -82
- package/lib/module/components/MFBuilding.js.map +1 -1
- package/lib/module/components/MFCircle.js +22 -80
- package/lib/module/components/MFCircle.js.map +1 -1
- package/lib/module/components/MFDirectionsRenderer.js +16 -85
- package/lib/module/components/MFDirectionsRenderer.js.map +1 -1
- package/lib/module/components/MFMapView.js +51 -136
- package/lib/module/components/MFMapView.js.map +1 -1
- package/lib/module/components/MFMarker.js +17 -92
- package/lib/module/components/MFMarker.js.map +1 -1
- package/lib/module/components/MFPOI.js +19 -84
- package/lib/module/components/MFPOI.js.map +1 -1
- package/lib/module/components/MFPolygon.js +17 -79
- package/lib/module/components/MFPolygon.js.map +1 -1
- package/lib/module/components/MFPolyline.js +19 -79
- package/lib/module/components/MFPolyline.js.map +1 -1
- package/lib/module/components/MFTileOverlay.js +10 -9
- package/lib/module/components/MFTileOverlay.js.map +1 -1
- package/lib/module/components/Map4dMapView.js +2 -0
- package/lib/module/components/Map4dMapView.js.map +1 -1
- package/lib/module/components/extends/AreaFocusManager.js +6 -32
- package/lib/module/components/extends/AreaFocusManager.js.map +1 -1
- package/lib/module/components/extends/AreaFocuser.js +3 -15
- package/lib/module/components/extends/AreaFocuser.js.map +1 -1
- package/lib/module/components/extends/BoundHelper.js +2 -5
- package/lib/module/components/extends/BoundHelper.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusAreas.js +2 -33
- package/lib/module/components/extends/area/AreaFocusAreas.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusGeometryUtils.js +2 -32
- package/lib/module/components/extends/area/AreaFocusGeometryUtils.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusSession.js +2 -17
- package/lib/module/components/extends/area/AreaFocusSession.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusTypes.js +3 -0
- package/lib/module/components/extends/area/AreaFocusTypes.js.map +1 -1
- package/lib/module/components/internal/DefaultRoadmapStyle.js +2 -0
- package/lib/module/components/internal/DefaultRoadmapStyle.js.map +1 -1
- package/lib/module/components/internal/GeojsonStyleUtils.js +21 -28
- package/lib/module/components/internal/GeojsonStyleUtils.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/native/Map4dMapNativeModule.js +5 -0
- package/lib/module/native/Map4dMapNativeModule.js.map +1 -0
- package/lib/module/native/NativeModuleResolver.js +29 -0
- package/lib/module/native/NativeModuleResolver.js.map +1 -0
- package/lib/module/native/ViewManagerCommand.js +61 -0
- package/lib/module/native/ViewManagerCommand.js.map +1 -0
- package/lib/module/specs/NativeMap4dMap.js +5 -0
- package/lib/module/specs/NativeMap4dMap.js.map +1 -0
- package/lib/typescript/components/MFBanDoSo/constants.d.ts +11 -0
- package/lib/typescript/components/MFBanDoSo/constants.d.ts.map +1 -0
- package/lib/typescript/components/MFBanDoSo/helpers.d.ts +14 -0
- package/lib/typescript/components/MFBanDoSo/helpers.d.ts.map +1 -0
- package/lib/typescript/components/MFBanDoSo/propTypes.d.ts +2 -0
- package/lib/typescript/components/MFBanDoSo/propTypes.d.ts.map +1 -0
- package/lib/typescript/components/MFBanDoSo/styles.d.ts +336 -0
- package/lib/typescript/components/MFBanDoSo/styles.d.ts.map +1 -0
- package/lib/typescript/components/MFBanDoSo/ui.d.ts +32 -0
- package/lib/typescript/components/MFBanDoSo/ui.d.ts.map +1 -0
- package/lib/typescript/components/MFBanDoSo.d.ts +38 -0
- package/lib/typescript/components/MFBanDoSo.d.ts.map +1 -0
- package/lib/typescript/components/MFBuilding.d.ts +24 -0
- package/lib/typescript/components/MFBuilding.d.ts.map +1 -0
- package/lib/typescript/components/MFCircle.d.ts +24 -0
- package/lib/typescript/components/MFCircle.d.ts.map +1 -0
- package/lib/typescript/components/MFDirectionsRenderer.d.ts +19 -0
- package/lib/typescript/components/MFDirectionsRenderer.d.ts.map +1 -0
- package/lib/typescript/components/MFMapView.d.ts +66 -0
- package/lib/typescript/components/MFMapView.d.ts.map +1 -0
- package/lib/typescript/components/MFMarker.d.ts +26 -0
- package/lib/typescript/components/MFMarker.d.ts.map +1 -0
- package/lib/typescript/components/MFPOI.d.ts +24 -0
- package/lib/typescript/components/MFPOI.d.ts.map +1 -0
- package/lib/typescript/components/MFPolygon.d.ts +24 -0
- package/lib/typescript/components/MFPolygon.d.ts.map +1 -0
- package/lib/typescript/components/MFPolyline.d.ts +24 -0
- package/lib/typescript/components/MFPolyline.d.ts.map +1 -0
- package/lib/typescript/components/MFTileOverlay.d.ts +12 -0
- package/lib/typescript/components/MFTileOverlay.d.ts.map +1 -0
- package/lib/typescript/components/Map4dMapView.d.ts +8 -7
- package/lib/typescript/components/Map4dMapView.d.ts.map +1 -0
- package/lib/typescript/components/extends/AreaFocusManager.d.ts +34 -0
- package/lib/typescript/components/extends/AreaFocusManager.d.ts.map +1 -0
- package/lib/typescript/components/extends/AreaFocuser.d.ts +15 -0
- package/lib/typescript/components/extends/AreaFocuser.d.ts.map +1 -0
- package/lib/typescript/components/extends/BoundHelper.d.ts +11 -0
- package/lib/typescript/components/extends/BoundHelper.d.ts.map +1 -0
- package/lib/typescript/components/extends/area/AreaFocusAreas.d.ts +58 -0
- package/lib/typescript/components/extends/area/AreaFocusAreas.d.ts.map +1 -0
- package/lib/typescript/components/extends/area/AreaFocusGeometryUtils.d.ts +19 -0
- package/lib/typescript/components/extends/area/AreaFocusGeometryUtils.d.ts.map +1 -0
- package/lib/typescript/components/extends/area/AreaFocusSession.d.ts +14 -0
- package/lib/typescript/components/extends/area/AreaFocusSession.d.ts.map +1 -0
- package/lib/typescript/components/extends/area/AreaFocusTypes.d.ts +40 -0
- package/lib/typescript/components/extends/area/AreaFocusTypes.d.ts.map +1 -0
- package/lib/typescript/components/internal/DefaultRoadmapStyle.d.ts +820 -0
- package/lib/typescript/components/internal/DefaultRoadmapStyle.d.ts.map +1 -0
- package/lib/typescript/components/internal/GeojsonStyleUtils.d.ts +3 -0
- package/lib/typescript/components/internal/GeojsonStyleUtils.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +13 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/native/Map4dMapNativeModule.d.ts +2 -0
- package/lib/typescript/native/Map4dMapNativeModule.d.ts.map +1 -0
- package/lib/typescript/native/NativeModuleResolver.d.ts +3 -0
- package/lib/typescript/native/NativeModuleResolver.d.ts.map +1 -0
- package/lib/typescript/native/ViewManagerCommand.d.ts +11 -0
- package/lib/typescript/native/ViewManagerCommand.d.ts.map +1 -0
- package/package.json +27 -11
- package/src/components/MFBanDoSo/constants.js +38 -0
- package/src/components/MFBanDoSo/helpers.js +273 -0
- package/src/components/MFBanDoSo/propTypes.js +14 -0
- package/src/components/MFBanDoSo/styles.js +323 -0
- package/src/components/MFBanDoSo/ui.js +261 -0
- package/src/components/MFBanDoSo.js +280 -78
- package/src/components/MFBuilding.js +8 -48
- package/src/components/MFCircle.js +8 -48
- package/src/components/MFDirectionsRenderer.js +8 -47
- package/src/components/MFMapView.js +31 -53
- package/src/components/MFMarker.js +9 -50
- package/src/components/MFPOI.js +8 -48
- package/src/components/MFPolygon.js +8 -48
- package/src/components/MFPolyline.js +8 -48
- package/src/components/internal/GeojsonStyleUtils.js +3 -0
- package/src/native/Map4dMapNativeModule.js +3 -0
- package/src/native/NativeModuleResolver.js +33 -0
- package/src/native/ViewManagerCommand.js +82 -0
- package/src/specs/NativeMap4dMap.js +12 -0
- package/ios/Map4dMapViewManager.m +0 -34
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import { AreaFocusSession } from './area/AreaFocusSession';
|
|
2
4
|
import { ProvinceArea, IndustrialEconomicArea } from './area/AreaFocusAreas';
|
|
3
5
|
import { IndustrialEconomicType } from './area/AreaFocusTypes';
|
|
6
|
+
|
|
4
7
|
/**
|
|
5
8
|
* @typedef {'normal' | 'highlight'} FocusDisplay
|
|
6
9
|
*/
|
|
@@ -41,25 +44,20 @@ export class AreaFocusManager {
|
|
|
41
44
|
this.mapView = mapView;
|
|
42
45
|
this.currentSession = null;
|
|
43
46
|
}
|
|
44
|
-
|
|
45
47
|
async _focusArea(area, options) {
|
|
46
48
|
this.clear();
|
|
47
|
-
|
|
48
49
|
if (!area) {
|
|
49
50
|
return null;
|
|
50
51
|
}
|
|
51
|
-
|
|
52
52
|
try {
|
|
53
53
|
if (!(await area.load())) {
|
|
54
54
|
return null;
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
const focusOptions = {
|
|
57
|
+
...(options || {})
|
|
58
58
|
};
|
|
59
59
|
const bounds = area.getBounds() || VIETNAM_MAINLAND_BOUNDS;
|
|
60
|
-
|
|
61
60
|
this._fitBounds(bounds, focusOptions);
|
|
62
|
-
|
|
63
61
|
this.currentSession = new AreaFocusSession(this.mapView, area, focusOptions);
|
|
64
62
|
this.currentSession.render();
|
|
65
63
|
return this.currentSession;
|
|
@@ -68,17 +66,13 @@ export class AreaFocusManager {
|
|
|
68
66
|
return null;
|
|
69
67
|
}
|
|
70
68
|
}
|
|
71
|
-
|
|
72
69
|
async _focusProvince(options) {
|
|
73
70
|
const provinceId = this._getProvinceId(options);
|
|
74
|
-
|
|
75
71
|
const provinceName = this._getProvinceName(options);
|
|
76
|
-
|
|
77
72
|
if (provinceId == null && !provinceName) {
|
|
78
73
|
this.clear();
|
|
79
74
|
return null;
|
|
80
75
|
}
|
|
81
|
-
|
|
82
76
|
const area = provinceId != null ? new ProvinceArea(provinceId) : ProvinceArea.fromName(provinceName);
|
|
83
77
|
const display = options && options.display === 'highlight' ? 'highlight' : 'normal';
|
|
84
78
|
return this._focusArea(area, {
|
|
@@ -86,66 +80,54 @@ export class AreaFocusManager {
|
|
|
86
80
|
padding: options ? options.padding : undefined
|
|
87
81
|
});
|
|
88
82
|
}
|
|
83
|
+
|
|
89
84
|
/**
|
|
90
85
|
* @param {FocusOptions | null | undefined} focusOptions
|
|
91
86
|
* @returns {Promise<AreaFocusSession | null>}
|
|
92
87
|
*/
|
|
93
|
-
|
|
94
|
-
|
|
95
88
|
async focus(focusOptions) {
|
|
96
89
|
if (focusOptions == null) {
|
|
97
90
|
this.clear();
|
|
98
91
|
return null;
|
|
99
92
|
}
|
|
100
|
-
|
|
101
93
|
if (focusOptions.type === 'province') {
|
|
102
94
|
return this._focusProvince(focusOptions);
|
|
103
95
|
}
|
|
104
|
-
|
|
105
96
|
if (focusOptions.id == null) {
|
|
106
97
|
console.warn('Focus options must include an id for non-province types:', focusOptions);
|
|
107
98
|
this.clear();
|
|
108
99
|
return null;
|
|
109
100
|
}
|
|
110
|
-
|
|
111
101
|
const industrialEconomicType = this._getIndustrialEconomicType(focusOptions.type);
|
|
112
|
-
|
|
113
102
|
if (industrialEconomicType != null) {
|
|
114
103
|
return this._focusArea(new IndustrialEconomicArea(industrialEconomicType, focusOptions.id), {
|
|
115
104
|
display: focusOptions.display,
|
|
116
105
|
padding: focusOptions.padding
|
|
117
106
|
});
|
|
118
107
|
}
|
|
119
|
-
|
|
120
108
|
console.warn('Unsupported focus type:', focusOptions.type);
|
|
121
109
|
return null;
|
|
122
110
|
}
|
|
123
|
-
|
|
124
111
|
_getIndustrialEconomicType(type) {
|
|
125
112
|
if (typeof type === 'number') {
|
|
126
113
|
const values = Object.values(IndustrialEconomicType);
|
|
127
114
|
return values.includes(type) ? type : null;
|
|
128
115
|
}
|
|
129
|
-
|
|
130
116
|
if (typeof type !== 'string') {
|
|
131
117
|
return null;
|
|
132
118
|
}
|
|
133
|
-
|
|
134
119
|
return FOCUS_TYPE_TO_INDUSTRIAL_ECONOMIC_TYPE[type] || null;
|
|
135
120
|
}
|
|
136
|
-
|
|
137
121
|
clear() {
|
|
138
122
|
if (this.currentSession) {
|
|
139
123
|
this.currentSession.destroy();
|
|
140
124
|
this.currentSession = null;
|
|
141
125
|
}
|
|
142
126
|
}
|
|
143
|
-
|
|
144
127
|
_fitBounds(bounds, options) {
|
|
145
128
|
if (!this.mapView || typeof this.mapView.fitBounds !== 'function' || !bounds) {
|
|
146
129
|
return;
|
|
147
130
|
}
|
|
148
|
-
|
|
149
131
|
this.mapView.fitBounds({
|
|
150
132
|
bounds: {
|
|
151
133
|
southWest: {
|
|
@@ -160,34 +142,26 @@ export class AreaFocusManager {
|
|
|
160
142
|
padding: options ? options.padding : undefined
|
|
161
143
|
});
|
|
162
144
|
}
|
|
163
|
-
|
|
164
145
|
_getProvinceName(options) {
|
|
165
146
|
if (options == null || typeof options !== 'object') {
|
|
166
147
|
return null;
|
|
167
148
|
}
|
|
168
|
-
|
|
169
149
|
if (typeof options.name === 'string') {
|
|
170
150
|
const name = options.name.trim();
|
|
171
151
|
return name.length > 0 ? name : null;
|
|
172
152
|
}
|
|
173
|
-
|
|
174
153
|
const optionKeys = Object.keys(options);
|
|
175
154
|
const unsupportedKeys = optionKeys.filter(key => key !== 'type' && key !== 'id' && key !== 'name' && key !== 'display' && key !== 'padding');
|
|
176
|
-
|
|
177
155
|
if (unsupportedKeys.length > 0) {
|
|
178
156
|
console.warn(`[AreaFocusManager] focusProvince expects options like { type: 'province', name: 'Ha Noi', display: 'highlight' }. Unsupported keys: ${unsupportedKeys.join(', ')}`);
|
|
179
157
|
}
|
|
180
|
-
|
|
181
158
|
return null;
|
|
182
159
|
}
|
|
183
|
-
|
|
184
160
|
_getProvinceId(options) {
|
|
185
161
|
if (options == null || typeof options !== 'object') {
|
|
186
162
|
return null;
|
|
187
163
|
}
|
|
188
|
-
|
|
189
164
|
return typeof options.id === 'number' ? options.id : null;
|
|
190
165
|
}
|
|
191
|
-
|
|
192
166
|
}
|
|
193
167
|
//# sourceMappingURL=AreaFocusManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AreaFocusSession","ProvinceArea","IndustrialEconomicArea","IndustrialEconomicType","VIETNAM_MAINLAND_BOUNDS","minLat","minLng","maxLat","maxLng","FOCUS_TYPE_TO_INDUSTRIAL_ECONOMIC_TYPE","industrialZone","INDUSTRIAL_ZONE","economicZone","ECONOMIC_ZONE","ecoIndustrialZone","ECO_INDUSTRIAL_ZONE","freeTradeZone","FREE_TRADE_ZONE","nonTariffZone","NON_TARIFF_ZONE","otherZoneModel","OTHER_ZONE_MODEL","AreaFocusManager","constructor","mapView","currentSession","_focusArea","area","options","clear","load","focusOptions","bounds","getBounds","_fitBounds","render","error","console","_focusProvince","provinceId","_getProvinceId","provinceName","_getProvinceName","fromName","display","padding","undefined","focus","type","id","warn","industrialEconomicType","_getIndustrialEconomicType","values","Object","includes","destroy","fitBounds","southWest","latitude","longitude","northEast","name","trim","length","optionKeys","keys","unsupportedKeys","filter","key","join"],"sources":["AreaFocusManager.js"],"sourcesContent":["import {AreaFocusSession} from './area/AreaFocusSession'\r\nimport {ProvinceArea, IndustrialEconomicArea} from './area/AreaFocusAreas'\r\nimport {IndustrialEconomicType} from './area/AreaFocusTypes'\r\n\r\n/**\r\n * @typedef {'normal' | 'highlight'} FocusDisplay\r\n */\r\n\r\n/**\r\n * @typedef {{left?: number, right?: number, top?: number, bottom?: number}} FocusPadding\r\n */\r\n\r\n/**\r\n * @typedef {'province' | 'industrialZone' | 'economicZone' | 'ecoIndustrialZone' | 'freeTradeZone' | 'nonTariffZone' | 'otherZoneModel' | number} FocusType\r\n */\r\n\r\n/**\r\n * @typedef {Object} FocusOptions\r\n * @property {FocusType} type\r\n * @property {number=} id\r\n * @property {string=} name\r\n * @property {FocusDisplay=} display\r\n * @property {FocusPadding=} padding\r\n */\r\n\r\nconst VIETNAM_MAINLAND_BOUNDS = {\r\n minLat: 8.18,\r\n minLng: 102.14,\r\n maxLat: 23.4,\r\n maxLng: 109.47,\r\n}\r\n\r\nconst FOCUS_TYPE_TO_INDUSTRIAL_ECONOMIC_TYPE = {\r\n industrialZone: IndustrialEconomicType.INDUSTRIAL_ZONE,\r\n economicZone: IndustrialEconomicType.ECONOMIC_ZONE,\r\n ecoIndustrialZone: IndustrialEconomicType.ECO_INDUSTRIAL_ZONE,\r\n freeTradeZone: IndustrialEconomicType.FREE_TRADE_ZONE,\r\n nonTariffZone: IndustrialEconomicType.NON_TARIFF_ZONE,\r\n otherZoneModel: IndustrialEconomicType.OTHER_ZONE_MODEL,\r\n}\r\n\r\nexport class AreaFocusManager {\r\n constructor(mapView) {\r\n this.mapView = mapView\r\n this.currentSession = null\r\n }\r\n\r\n async _focusArea(area, options) {\r\n this.clear()\r\n\r\n if (!area) {\r\n return null\r\n }\r\n\r\n try {\r\n if (!(await area.load())) {\r\n return null\r\n }\r\n\r\n const focusOptions = {...(options || {})}\r\n const bounds = area.getBounds() || VIETNAM_MAINLAND_BOUNDS\r\n\r\n this._fitBounds(bounds, focusOptions)\r\n\r\n this.currentSession = new AreaFocusSession(this.mapView, area, focusOptions)\r\n this.currentSession.render()\r\n\r\n return this.currentSession\r\n }\r\n catch (error) {\r\n console.error('Cannot focus area:', error)\r\n return null\r\n }\r\n }\r\n\r\n async _focusProvince(options) {\r\n const provinceId = this._getProvinceId(options)\r\n const provinceName = this._getProvinceName(options)\r\n\r\n if (provinceId == null && !provinceName) {\r\n this.clear()\r\n return null\r\n }\r\n\r\n const area = provinceId != null ? new ProvinceArea(provinceId) : ProvinceArea.fromName(provinceName)\r\n const display = options && options.display === 'highlight' ? 'highlight' : 'normal'\r\n\r\n return this._focusArea(area, {\r\n display,\r\n padding: options ? options.padding : undefined,\r\n })\r\n }\r\n\r\n /**\r\n * @param {FocusOptions | null | undefined} focusOptions\r\n * @returns {Promise<AreaFocusSession | null>}\r\n */\r\n async focus(focusOptions) {\r\n if (focusOptions == null) {\r\n this.clear()\r\n return null\r\n }\r\n\r\n if (focusOptions.type === 'province') {\r\n return this._focusProvince(focusOptions)\r\n }\r\n\r\n if (focusOptions.id == null) {\r\n console.warn('Focus options must include an id for non-province types:', focusOptions)\r\n this.clear()\r\n return null\r\n }\r\n\r\n const industrialEconomicType = this._getIndustrialEconomicType(focusOptions.type)\r\n\r\n if (industrialEconomicType != null) {\r\n return this._focusArea(new IndustrialEconomicArea(industrialEconomicType, focusOptions.id), {\r\n display: focusOptions.display,\r\n padding: focusOptions.padding,\r\n })\r\n }\r\n\r\n console.warn('Unsupported focus type:', focusOptions.type)\r\n return null\r\n }\r\n\r\n _getIndustrialEconomicType(type) {\r\n if (typeof type === 'number') {\r\n const values = Object.values(IndustrialEconomicType)\r\n return values.includes(type) ? type : null\r\n }\r\n\r\n if (typeof type !== 'string') {\r\n return null\r\n }\r\n\r\n return FOCUS_TYPE_TO_INDUSTRIAL_ECONOMIC_TYPE[type] || null\r\n }\r\n\r\n clear() {\r\n if (this.currentSession) {\r\n this.currentSession.destroy()\r\n this.currentSession = null\r\n }\r\n }\r\n\r\n _fitBounds(bounds, options) {\r\n if (!this.mapView || typeof this.mapView.fitBounds !== 'function' || !bounds) {\r\n return\r\n }\r\n\r\n this.mapView.fitBounds({\r\n bounds: {\r\n southWest: {\r\n latitude: bounds.minLat,\r\n longitude: bounds.minLng,\r\n },\r\n northEast: {\r\n latitude: bounds.maxLat,\r\n longitude: bounds.maxLng,\r\n },\r\n },\r\n padding: options ? options.padding : undefined,\r\n })\r\n }\r\n\r\n _getProvinceName(options) {\r\n if (options == null || typeof options !== 'object') {\r\n return null\r\n }\r\n\r\n if (typeof options.name === 'string') {\r\n const name = options.name.trim()\r\n return name.length > 0 ? name : null\r\n }\r\n\r\n const optionKeys = Object.keys(options)\r\n const unsupportedKeys = optionKeys.filter((key) => key !== 'type' && key !== 'id' && key !== 'name' && key !== 'display' && key !== 'padding')\r\n\r\n if (unsupportedKeys.length > 0) {\r\n console.warn(\r\n `[AreaFocusManager] focusProvince expects options like { type: 'province', name: 'Ha Noi', display: 'highlight' }. Unsupported keys: ${unsupportedKeys.join(', ')}`\r\n )\r\n }\r\n\r\n return null\r\n }\r\n\r\n _getProvinceId(options) {\r\n if (options == null || typeof options !== 'object') {\r\n return null\r\n }\r\n\r\n return typeof options.id === 'number' ? options.id : null\r\n }\r\n}\r\n"],"mappings":"AAAA,SAAQA,gBAAR,QAA+B,yBAA/B;AACA,SAAQC,YAAR,EAAsBC,sBAAtB,QAAmD,uBAAnD;AACA,SAAQC,sBAAR,QAAqC,uBAArC;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,uBAAuB,GAAG;EAC9BC,MAAM,EAAE,IADsB;EAE9BC,MAAM,EAAE,MAFsB;EAG9BC,MAAM,EAAE,IAHsB;EAI9BC,MAAM,EAAE;AAJsB,CAAhC;AAOA,MAAMC,sCAAsC,GAAG;EAC7CC,cAAc,EAAEP,sBAAsB,CAACQ,eADM;EA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ED,IAAI,OAAOA,OAAO,CAACkC,IAAf,KAAwB,QAA5B,EAAsC;MACpC,MAAMA,IAAI,GAAGlC,OAAO,CAACkC,IAAR,CAAaC,IAAb,EAAb;MACA,OAAOD,IAAI,CAACE,MAAL,GAAc,CAAd,GAAkBF,IAAlB,GAAyB,IAAhC;IACD;;IAED,MAAMG,UAAU,GAAGX,MAAM,CAACY,IAAP,CAAYtC,OAAZ,CAAnB;IACA,MAAMuC,eAAe,GAAGF,UAAU,CAACG,MAAX,CAAmBC,GAAD,IAASA,GAAG,KAAK,MAAR,IAAkBA,GAAG,KAAK,IAA1B,IAAkCA,GAAG,KAAK,MAA1C,IAAoDA,GAAG,KAAK,SAA5D,IAAyEA,GAAG,KAAK,SAA5G,CAAxB;;IAEA,IAAIF,eAAe,CAACH,MAAhB,GAAyB,CAA7B,EAAgC;MAC9B3B,OAAO,CAACa,IAAR,CACG,uIAAsIiB,eAAe,CAACG,IAAhB,CAAqB,IAArB,CAA2B,EADpK;IAGD;;IAED,OAAO,IAAP;EACD;;EAED9B,cAAc,CAACZ,OAAD,EAAU;IACtB,IAAIA,OAAO,IAAI,IAAX,IAAmB,OAAOA,OAAP,KAAmB,QAA1C,EAAoD;MAClD,OAAO,IAAP;IACD;;IAED,OAAO,OAAOA,OAAO,CAACqB,EAAf,KAAsB,QAAtB,GAAiCrB,OAAO,CAACqB,EAAzC,GAA8C,IAArD;EACD;;AAzJ2B"}
|
|
1
|
+
{"version":3,"names":["AreaFocusSession","ProvinceArea","IndustrialEconomicArea","IndustrialEconomicType","VIETNAM_MAINLAND_BOUNDS","minLat","minLng","maxLat","maxLng","FOCUS_TYPE_TO_INDUSTRIAL_ECONOMIC_TYPE","industrialZone","INDUSTRIAL_ZONE","economicZone","ECONOMIC_ZONE","ecoIndustrialZone","ECO_INDUSTRIAL_ZONE","freeTradeZone","FREE_TRADE_ZONE","nonTariffZone","NON_TARIFF_ZONE","otherZoneModel","OTHER_ZONE_MODEL","AreaFocusManager","constructor","mapView","currentSession","_focusArea","area","options","clear","load","focusOptions","bounds","getBounds","_fitBounds","render","error","console","_focusProvince","provinceId","_getProvinceId","provinceName","_getProvinceName","fromName","display","padding","undefined","focus","type","id","warn","industrialEconomicType","_getIndustrialEconomicType","values","Object","includes","destroy","fitBounds","southWest","latitude","longitude","northEast","name","trim","length","optionKeys","keys","unsupportedKeys","filter","key","join"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/extends/AreaFocusManager.js"],"mappings":";;AAAA,SAAQA,gBAAgB,QAAO,yBAAyB;AACxD,SAAQC,YAAY,EAAEC,sBAAsB,QAAO,uBAAuB;AAC1E,SAAQC,sBAAsB,QAAO,uBAAuB;;AAE5D;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMC,uBAAuB,GAAG;EAC9BC,MAAM,EAAE,IAAI;EACZC,MAAM,EAAE,MAAM;EACdC,MAAM,EAAE,IAAI;EACZC,MAAM,EAAE;AACV,CAAC;AAED,MAAMC,sCAAsC,GAAG;EAC7CC,cAAc,EAAEP,sBAAsB,CAACQ,eAAe;EACtDC,YAAY,EAAET,sBAAsB,CAACU,aAAa;EAClDC,iBAAiB,EAAEX,sBAAsB,CAACY,mBAAmB;EAC7DC,aAAa,EAAEb,sBAAsB,CAACc,eAAe;EACrDC,aAAa,EAAEf,sBAAsB,CAACgB,eAAe;EACrDC,cAAc,EAAEjB,sBAAsB,CAACkB;AACzC,CAAC;AAED,OAAO,MAAMC,gBAAgB,CAAC;EAC5BC,WAAWA,CAACC,OAAO,EAAE;IACnB,IAAI,CAACA,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,cAAc,GAAG,IAAI;EAC5B;EAEA,MAAMC,UAAUA,CAACC,IAAI,EAAEC,OAAO,EAAE;IAC9B,IAAI,CAACC,KAAK,CAAC,CAAC;IAEZ,IAAI,CAACF,IAAI,EAAE;MACT,OAAO,IAAI;IACb;IAEA,IAAI;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AAG,KAAK,IAAI,IAAIA,GAAG,KAAK,MAAM,IAAIA,GAAG,KAAK,SAAS,IAAIA,GAAG,KAAK,SAAS,CAAC;IAE9I,IAAIF,eAAe,CAACH,MAAM,GAAG,CAAC,EAAE;MAC9B3B,OAAO,CAACa,IAAI,CACV,uIAAuIiB,eAAe,CAACG,IAAI,CAAC,IAAI,CAAC,EACnK,CAAC;IACH;IAEA,OAAO,IAAI;EACb;EAEA9B,cAAcA,CAACZ,OAAO,EAAE;IACtB,IAAIA,OAAO,IAAI,IAAI,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;MAClD,OAAO,IAAI;IACb;IAEA,OAAO,OAAOA,OAAO,CAACqB,EAAE,KAAK,QAAQ,GAAGrB,OAAO,CAACqB,EAAE,GAAG,IAAI;EAC3D;AACF","ignoreList":[]}
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
export class AreaFocuser {
|
|
2
4
|
constructor(areaFocusManager) {
|
|
3
5
|
this._areaFocusManager = areaFocusManager;
|
|
4
6
|
}
|
|
7
|
+
|
|
5
8
|
/**
|
|
6
9
|
* @param {{name?: string, highlight?: boolean}=} options
|
|
7
10
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
11
|
async focusProvince(options) {
|
|
11
12
|
const provinceName = this._getProvinceName(options);
|
|
12
|
-
|
|
13
13
|
const shouldHighlight = this._shouldHighlight(options);
|
|
14
|
-
|
|
15
14
|
if (!provinceName) {
|
|
16
15
|
this._clear();
|
|
17
|
-
|
|
18
16
|
return;
|
|
19
17
|
}
|
|
20
|
-
|
|
21
18
|
if (this._areaFocusManager) {
|
|
22
19
|
await this._areaFocusManager.focus({
|
|
23
20
|
type: 'province',
|
|
@@ -26,39 +23,30 @@ export class AreaFocuser {
|
|
|
26
23
|
});
|
|
27
24
|
}
|
|
28
25
|
}
|
|
29
|
-
|
|
30
26
|
_clear() {
|
|
31
27
|
if (this._areaFocusManager) {
|
|
32
28
|
this._areaFocusManager.clear();
|
|
33
29
|
}
|
|
34
30
|
}
|
|
35
|
-
|
|
36
31
|
_getProvinceName(options) {
|
|
37
32
|
if (options == null || typeof options !== 'object') {
|
|
38
33
|
return null;
|
|
39
34
|
}
|
|
40
|
-
|
|
41
35
|
if (typeof options.name === 'string') {
|
|
42
36
|
return options.name.trim();
|
|
43
37
|
}
|
|
44
|
-
|
|
45
38
|
const optionKeys = Object.keys(options);
|
|
46
39
|
const unsupportedKeys = optionKeys.filter(key => key !== 'name' && key !== 'highlight');
|
|
47
|
-
|
|
48
40
|
if (unsupportedKeys.length > 0) {
|
|
49
41
|
console.warn(`[AreaFocuser] focusProvince expects options like { name: 'Ha Noi', highlight: true }. Unsupported keys: ${unsupportedKeys.join(', ')}`);
|
|
50
42
|
}
|
|
51
|
-
|
|
52
43
|
return null;
|
|
53
44
|
}
|
|
54
|
-
|
|
55
45
|
_shouldHighlight(options) {
|
|
56
46
|
if (options == null || typeof options !== 'object') {
|
|
57
47
|
return false;
|
|
58
48
|
}
|
|
59
|
-
|
|
60
49
|
return options.highlight === true;
|
|
61
50
|
}
|
|
62
|
-
|
|
63
51
|
}
|
|
64
52
|
//# sourceMappingURL=AreaFocuser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AreaFocuser","constructor","areaFocusManager","_areaFocusManager","focusProvince","options","provinceName","_getProvinceName","shouldHighlight","_shouldHighlight","_clear","focus","type","name","display","clear","trim","optionKeys","Object","keys","unsupportedKeys","filter","key","length","console","warn","join","highlight"],"
|
|
1
|
+
{"version":3,"names":["AreaFocuser","constructor","areaFocusManager","_areaFocusManager","focusProvince","options","provinceName","_getProvinceName","shouldHighlight","_shouldHighlight","_clear","focus","type","name","display","clear","trim","optionKeys","Object","keys","unsupportedKeys","filter","key","length","console","warn","join","highlight"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/extends/AreaFocuser.js"],"mappings":";;AAAA,OAAO,MAAMA,WAAW,CAAC;EAEvBC,WA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C,EACvI,CAAC;IACH;IAEA,OAAO,IAAI;EACb;EAEAjB,gBAAgBA,CAACJ,OAAO,EAAE;IACxB,IAAIA,OAAO,IAAI,IAAI,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;MAClD,OAAO,KAAK;IACd;IAEA,OAAOA,OAAO,CAACsB,SAAS,KAAK,IAAI;EACnC;AACF","ignoreList":[]}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
class BoundHelper {
|
|
2
4
|
static createEmptyBounds() {
|
|
3
5
|
return {
|
|
@@ -7,23 +9,18 @@ class BoundHelper {
|
|
|
7
9
|
maxLng: -Infinity
|
|
8
10
|
};
|
|
9
11
|
}
|
|
10
|
-
|
|
11
12
|
static updateBounds(bounds, lat, lng) {
|
|
12
13
|
bounds.minLat = Math.min(bounds.minLat, lat);
|
|
13
14
|
bounds.minLng = Math.min(bounds.minLng, lng);
|
|
14
15
|
bounds.maxLat = Math.max(bounds.maxLat, lat);
|
|
15
16
|
bounds.maxLng = Math.max(bounds.maxLng, lng);
|
|
16
17
|
}
|
|
17
|
-
|
|
18
18
|
static isValidBounds(bounds) {
|
|
19
19
|
if (!bounds) {
|
|
20
20
|
return false;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
22
|
return !(bounds.minLat === Infinity || bounds.minLng === Infinity || bounds.maxLat === -Infinity || bounds.maxLng === -Infinity);
|
|
24
23
|
}
|
|
25
|
-
|
|
26
24
|
}
|
|
27
|
-
|
|
28
25
|
export { BoundHelper };
|
|
29
26
|
//# sourceMappingURL=BoundHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BoundHelper","createEmptyBounds","minLat","Infinity","minLng","maxLat","maxLng","updateBounds","bounds","lat","lng","Math","min","max","isValidBounds"],"
|
|
1
|
+
{"version":3,"names":["BoundHelper","createEmptyBounds","minLat","Infinity","minLng","maxLat","maxLng","updateBounds","bounds","lat","lng","Math","min","max","isValidBounds"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/extends/BoundHelper.js"],"mappings":";;AAAA,MAAMA,WAAW,CAAC;EAChB,OAAOC,iBAAiBA,CAAA,EAAG;IACzB,OAAO;MACLC,MAAM,EAAEC,QAAQ;MAChBC,MAAM,EAAED,QAAQ;MAChBE,MAAM,EAAE,CAACF,QAAQ;MACjBG,MAAM,EAAE,CAACH;IACX,CAAC;EACH;EAEA,OAAOI,YAAYA,CAACC,MAAM,EAAEC,GAAG,EAAEC,GAAG,EAAE;IACpCF,MAAM,CAACN,MAAM,GAAGS,IAAI,CAACC,GAAG,CAACJ,MAAM,CAACN,MAAM,EAAEO,GAAG,CAAC;IAC5CD,MAAM,CAACJ,MAAM,GAAGO,IAAI,CAACC,GAAG,CAACJ,MAAM,CAACJ,MAAM,EAAEM,GAAG,CAAC;IAC5CF,MAAM,CAACH,MAAM,GAAGM,IAAI,CAACE,GAAG,CAACL,MAAM,CAACH,MAAM,EAAEI,GAAG,CAAC;IAC5CD,MAAM,CAACF,MAAM,GAAGK,IAAI,CAACE,GAAG,CAACL,MAAM,CAACF,MAAM,EAAEI,GAAG,CAAC;EAC9C;EAEA,OAAOI,aAAaA,CAACN,MAAM,EAAE;IAC3B,IAAI,CAACA,MAAM,EAAE;MACX,OAAO,KAAK;IACd;IAEA,OAAO,EACLA,MAAM,CAACN,MAAM,KAAKC,QAAQ,IAC1BK,MAAM,CAACJ,MAAM,KAAKD,QAAQ,IAC1BK,MAAM,CAACH,MAAM,KAAK,CAACF,QAAQ,IAC3BK,MAAM,CAACF,MAAM,KAAK,CAACH,QAAQ,CAC5B;EACH;AACF;AAEA,SAAQH,WAAW","ignoreList":[]}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
import { getViewboxFromGeometry } from './AreaFocusGeometryUtils';
|
|
2
4
|
import { IndustrialEconomicType } from './AreaFocusTypes';
|
|
3
5
|
const INDUSTRIAL_ECONOMIC_PATH_BY_TYPE = {
|
|
@@ -9,7 +11,6 @@ const INDUSTRIAL_ECONOMIC_PATH_BY_TYPE = {
|
|
|
9
11
|
[IndustrialEconomicType.OTHER_ZONE_MODEL]: 'mo-hinh-khu-khac'
|
|
10
12
|
};
|
|
11
13
|
const BDS_API_BASE_URL = 'https://cmcdtqg-gateway.dieuhanhso.vn/staging';
|
|
12
|
-
|
|
13
14
|
class ProvinceArea {
|
|
14
15
|
constructor(id) {
|
|
15
16
|
this.id = id;
|
|
@@ -18,47 +19,36 @@ class ProvinceArea {
|
|
|
18
19
|
this.geometryData = null;
|
|
19
20
|
this.bounds = null;
|
|
20
21
|
}
|
|
21
|
-
|
|
22
22
|
static fromName(name) {
|
|
23
23
|
const area = new ProvinceArea(null);
|
|
24
24
|
area.name = name;
|
|
25
25
|
return area;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
27
|
async load() {
|
|
29
28
|
if (this.loaded) {
|
|
30
29
|
return true;
|
|
31
30
|
}
|
|
32
|
-
|
|
33
31
|
const hasValidId = typeof this.id === 'number';
|
|
34
32
|
const hasValidName = typeof this.name === 'string' && this.name.trim() !== '';
|
|
35
|
-
|
|
36
33
|
if (!hasValidId && !hasValidName) {
|
|
37
34
|
return false;
|
|
38
35
|
}
|
|
39
|
-
|
|
40
36
|
const normalizedName = hasValidName ? this.name.trim() : null;
|
|
41
37
|
const url = hasValidId ? `${BDS_API_BASE_URL}/bds/api/dmhc/TinhThanh/${this.id}/geometry` : `${BDS_API_BASE_URL}/bds/api/dmhc/TinhThanh/geometry?ten=${encodeURIComponent(normalizedName)}`;
|
|
42
38
|
const response = await fetch(url);
|
|
43
|
-
|
|
44
39
|
if (!response.ok) {
|
|
45
40
|
return false;
|
|
46
41
|
}
|
|
47
|
-
|
|
48
42
|
const data = await response.json();
|
|
49
|
-
|
|
50
43
|
if (!data.success) {
|
|
51
44
|
console.error('Fetch province area data failed:', data.message);
|
|
52
45
|
return false;
|
|
53
46
|
}
|
|
54
|
-
|
|
55
47
|
const areaData = data.data;
|
|
56
48
|
const geometry = areaData && areaData.geometry ? areaData.geometry : null;
|
|
57
|
-
|
|
58
49
|
if (!geometry) {
|
|
59
50
|
return false;
|
|
60
51
|
}
|
|
61
|
-
|
|
62
52
|
this.geometryData = {
|
|
63
53
|
name: areaData && areaData.name ? areaData.name : normalizedName,
|
|
64
54
|
geometry
|
|
@@ -67,21 +57,16 @@ class ProvinceArea {
|
|
|
67
57
|
this.loaded = true;
|
|
68
58
|
return true;
|
|
69
59
|
}
|
|
70
|
-
|
|
71
60
|
getGeometryData() {
|
|
72
61
|
return this.geometryData;
|
|
73
62
|
}
|
|
74
|
-
|
|
75
63
|
getBounds() {
|
|
76
64
|
return this.bounds;
|
|
77
65
|
}
|
|
78
|
-
|
|
79
66
|
getId() {
|
|
80
67
|
return this.id != null ? this.id : `province-${this.name || 'unknown'}`;
|
|
81
68
|
}
|
|
82
|
-
|
|
83
69
|
}
|
|
84
|
-
|
|
85
70
|
class IndustrialEconomicArea {
|
|
86
71
|
constructor(type, id) {
|
|
87
72
|
this.type = type;
|
|
@@ -90,45 +75,34 @@ class IndustrialEconomicArea {
|
|
|
90
75
|
this.geometryData = null;
|
|
91
76
|
this.bounds = null;
|
|
92
77
|
}
|
|
93
|
-
|
|
94
78
|
async load() {
|
|
95
79
|
if (this.loaded) {
|
|
96
80
|
return true;
|
|
97
81
|
}
|
|
98
|
-
|
|
99
82
|
if (typeof this.id !== 'number') {
|
|
100
83
|
return false;
|
|
101
84
|
}
|
|
102
|
-
|
|
103
85
|
const pathSegment = INDUSTRIAL_ECONOMIC_PATH_BY_TYPE[this.type];
|
|
104
|
-
|
|
105
86
|
if (!pathSegment) {
|
|
106
87
|
console.error('Unsupported industrial/economic area type:', this.type);
|
|
107
88
|
return false;
|
|
108
89
|
}
|
|
109
|
-
|
|
110
90
|
const url = `${BDS_API_BASE_URL}/bds/api/kcnkkt/${pathSegment}/${this.id}/geometry`;
|
|
111
91
|
const response = await fetch(url);
|
|
112
|
-
|
|
113
92
|
if (!response.ok) {
|
|
114
93
|
console.error('Failed to fetch industrial zone data:', response.status, response.statusText);
|
|
115
94
|
return false;
|
|
116
95
|
}
|
|
117
|
-
|
|
118
96
|
const data = await response.json();
|
|
119
|
-
|
|
120
97
|
if (!data.success) {
|
|
121
98
|
console.error('API returned error:', data.message);
|
|
122
99
|
return false;
|
|
123
100
|
}
|
|
124
|
-
|
|
125
101
|
const areaData = data.data;
|
|
126
102
|
const geometry = areaData && areaData.geometry ? areaData.geometry : null;
|
|
127
|
-
|
|
128
103
|
if (!geometry) {
|
|
129
104
|
return false;
|
|
130
105
|
}
|
|
131
|
-
|
|
132
106
|
this.geometryData = {
|
|
133
107
|
name: areaData && areaData.name ? areaData.name : null,
|
|
134
108
|
geometry
|
|
@@ -137,20 +111,15 @@ class IndustrialEconomicArea {
|
|
|
137
111
|
this.loaded = true;
|
|
138
112
|
return true;
|
|
139
113
|
}
|
|
140
|
-
|
|
141
114
|
getGeometryData() {
|
|
142
115
|
return this.geometryData;
|
|
143
116
|
}
|
|
144
|
-
|
|
145
117
|
getBounds() {
|
|
146
118
|
return this.bounds;
|
|
147
119
|
}
|
|
148
|
-
|
|
149
120
|
getId() {
|
|
150
121
|
return this.id;
|
|
151
122
|
}
|
|
152
|
-
|
|
153
123
|
}
|
|
154
|
-
|
|
155
124
|
export { ProvinceArea, IndustrialEconomicArea };
|
|
156
125
|
//# sourceMappingURL=AreaFocusAreas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getViewboxFromGeometry","IndustrialEconomicType","INDUSTRIAL_ECONOMIC_PATH_BY_TYPE","INDUSTRIAL_ZONE","ECONOMIC_ZONE","ECO_INDUSTRIAL_ZONE","FREE_TRADE_ZONE","NON_TARIFF_ZONE","OTHER_ZONE_MODEL","BDS_API_BASE_URL","ProvinceArea","constructor","id","name","loaded","geometryData","bounds","fromName","area","load","hasValidId","hasValidName","trim","normalizedName","url","encodeURIComponent","response","fetch","ok","data","json","success","console","error","message","areaData","geometry","getGeometryData","getBounds","getId","IndustrialEconomicArea","type","pathSegment","status","statusText"],"
|
|
1
|
+
{"version":3,"names":["getViewboxFromGeometry","IndustrialEconomicType","INDUSTRIAL_ECONOMIC_PATH_BY_TYPE","INDUSTRIAL_ZONE","ECONOMIC_ZONE","ECO_INDUSTRIAL_ZONE","FREE_TRADE_ZONE","NON_TARIFF_ZONE","OTHER_ZONE_MODEL","BDS_API_BASE_URL","ProvinceArea","constructor","id","name","loaded","geometryData","bounds","fromName","area","load","hasValidId","hasValidName","trim","normalizedName","url","encodeURIComponent","response","fetch","ok","data","json","success","console","error","message","areaData","geometry","getGeometryData","getBounds","getId","IndustrialEconomicArea","type","pathSegment","status","statusText"],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/extends/area/AreaFocusAreas.js"],"mappings":";;AAAA,SAAQA,sBAAsB,QAAO,0BAA0B;AAC/D,SAAQC,sBAAsB,QAAO,kBAAkB;AAEvD,MAAMC,gCAAgC,GAAG;EACvC,CAACD,sBAAsB,CAACE,eAAe,GAAG,iBAAiB;EAC3D,CAACF,sBAAsB,CAACG,aAAa,GAAG,aAAa;EACrD,CAACH,sBAAsB,CAACI,mBAAmB,GAAG,2BAA2B;EACzE,CAACJ,sBAAsB,CAACK,eAAe,GAAG,sBAAsB;EAChE,CAACL,sBAAsB,CAACM,eAAe,GAAG,mBAAmB;EAC7D,CAACN,sBAAsB,CAACO,gBAAgB,GAAG;AAC7C,CAAC;AAED,MAAMC,gBAAgB,GAAG,+CAA+C;AAExE,MAAMC,YAAY,CAAC;EACjBC,WAAWA,CAACC,EAAE,EAAE;IACd,IAAI,CAACA,EAAE,GAAGA,EAAE;IACZ,IAAI,CAACC,IAAI,GAAG,IAAI;IAChB,IAAI,CAACC,MAAM,GAAG,KAAK;IACnB,IAAI,CAACC,YAAY,GAAG,IAAI;IACxB,IAAI,CAACC,MAAM,GAAG,IAAI;EACpB;EAEA,OAAOC,QAAQA,CAACJ,IAAI,EAAE;IAC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