@mint-ui/map 0.3.3-beta → 0.3.5-beta
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/dist/components/mint-map/MintMap.d.ts +1 -0
- package/dist/components/mint-map/core/MintMapController.d.ts +1 -0
- package/dist/components/mint-map/core/wrapper/MapMarkerWrapper.js +8 -0
- package/dist/components/mint-map/google/GoogleMintMapController.d.ts +1 -0
- package/dist/components/mint-map/google/GoogleMintMapController.js +14 -2
- package/dist/components/mint-map/naver/NaverMintMapController.d.ts +1 -0
- package/dist/components/mint-map/naver/NaverMintMapController.js +7 -5
- package/dist/index.es.js +29 -7
- package/dist/index.umd.js +29 -7
- package/package.json +1 -1
|
@@ -16,6 +16,7 @@ export declare abstract class MintMapController {
|
|
|
16
16
|
abstract markerToTheTop(marker: Marker): void;
|
|
17
17
|
abstract isMapDragged(): boolean;
|
|
18
18
|
abstract setMapDragged(value: boolean): void;
|
|
19
|
+
abstract setMarkerZIndex(marker: Marker, zIndex: number): void;
|
|
19
20
|
abstract createPolyline(polyline: Polyline): void;
|
|
20
21
|
abstract updatePolyline(polyline: Polyline, options: PolylineOptions): void;
|
|
21
22
|
abstract createPolygon(polygon: Polygon): void;
|
|
@@ -123,12 +123,20 @@ function MapMarkerWrapper(_a) {
|
|
|
123
123
|
if (markerRef.current) {
|
|
124
124
|
controller.updateMarker(markerRef.current, options);
|
|
125
125
|
offsetCalibration(controller.getMapType(), divElement, options);
|
|
126
|
+
|
|
127
|
+
if (markerRef.current.options.zIndex !== undefined) {
|
|
128
|
+
controller.setMarkerZIndex(markerRef.current, markerRef.current.options.zIndex);
|
|
129
|
+
}
|
|
126
130
|
} else {
|
|
127
131
|
markerRef.current = new MintMap.Marker(options);
|
|
128
132
|
markerRef.current.element = divElement;
|
|
129
133
|
controller.createMarker(markerRef.current);
|
|
130
134
|
offsetCalibration(controller.getMapType(), divElement, options);
|
|
131
135
|
|
|
136
|
+
if (markerRef.current.options.zIndex !== undefined) {
|
|
137
|
+
controller.setMarkerZIndex(markerRef.current, markerRef.current.options.zIndex);
|
|
138
|
+
}
|
|
139
|
+
|
|
132
140
|
if (movingAnimation) {
|
|
133
141
|
setMovingState(tslib.__assign(tslib.__assign({}, movingAnimation), {
|
|
134
142
|
marker: markerRef.current
|
|
@@ -19,6 +19,7 @@ export declare class GoogleMintMapController extends MintMapController {
|
|
|
19
19
|
updateMarker(marker: Marker, options: MarkerOptions): void;
|
|
20
20
|
private markerMaxZIndex;
|
|
21
21
|
private getMaxZIndex;
|
|
22
|
+
setMarkerZIndex(marker: Marker, zIndex: number): void;
|
|
22
23
|
markerToTheTop(marker: Marker): void;
|
|
23
24
|
clearDrawable(drawable: Drawable): boolean;
|
|
24
25
|
private dragged;
|
|
@@ -259,12 +259,22 @@ var GoogleMintMapController = function (_super) {
|
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
261
|
|
|
262
|
-
GoogleMintMapController.prototype.
|
|
262
|
+
GoogleMintMapController.prototype.setMarkerZIndex = function (marker, zIndex) {
|
|
263
263
|
if (this.map && marker.element && marker.element instanceof HTMLElement) {
|
|
264
264
|
var parent_1 = marker.element.parentElement;
|
|
265
265
|
|
|
266
266
|
if (parent_1) {
|
|
267
|
-
parent_1.style.zIndex = String(
|
|
267
|
+
parent_1.style.zIndex = String(zIndex);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
GoogleMintMapController.prototype.markerToTheTop = function (marker) {
|
|
273
|
+
if (this.map && marker.element && marker.element instanceof HTMLElement) {
|
|
274
|
+
var parent_2 = marker.element.parentElement;
|
|
275
|
+
|
|
276
|
+
if (parent_2) {
|
|
277
|
+
this.setMarkerZIndex(marker, this.getMaxZIndex(1, parent_2));
|
|
268
278
|
}
|
|
269
279
|
}
|
|
270
280
|
};
|
|
@@ -272,9 +282,11 @@ var GoogleMintMapController = function (_super) {
|
|
|
272
282
|
GoogleMintMapController.prototype.clearDrawable = function (drawable) {
|
|
273
283
|
if (drawable && drawable.native) {
|
|
274
284
|
if (drawable.native instanceof google.maps.Marker || drawable.native instanceof google.maps.Polygon || drawable.native instanceof google.maps.Polyline) {
|
|
285
|
+
google.maps.event.clearInstanceListeners(drawable.native);
|
|
275
286
|
drawable.native.setMap(null);
|
|
276
287
|
return true;
|
|
277
288
|
} else if (drawable.native instanceof google.maps.marker.AdvancedMarkerView) {
|
|
289
|
+
google.maps.event.clearInstanceListeners(drawable.native);
|
|
278
290
|
drawable.native.map = null;
|
|
279
291
|
return true;
|
|
280
292
|
}
|
|
@@ -21,6 +21,7 @@ export declare class NaverMintMapController extends MintMapController {
|
|
|
21
21
|
updateMarker(marker: Marker, options: MarkerOptions): void;
|
|
22
22
|
private markerMaxZIndex;
|
|
23
23
|
private getMaxZIndex;
|
|
24
|
+
setMarkerZIndex(marker: Marker, zIndex: number): void;
|
|
24
25
|
markerToTheTop(marker: Marker): void;
|
|
25
26
|
clearDrawable(drawable: Drawable): boolean;
|
|
26
27
|
private dragStartPoint;
|
|
@@ -260,16 +260,20 @@ var NaverMintMapController = function (_super) {
|
|
|
260
260
|
}
|
|
261
261
|
};
|
|
262
262
|
|
|
263
|
-
NaverMintMapController.prototype.
|
|
263
|
+
NaverMintMapController.prototype.setMarkerZIndex = function (marker, zIndex) {
|
|
264
264
|
if (this.map && marker.element && marker.element instanceof HTMLElement) {
|
|
265
265
|
var parent_1 = marker.element.parentElement;
|
|
266
266
|
|
|
267
267
|
if (parent_1) {
|
|
268
|
-
parent_1.style.zIndex = String(
|
|
268
|
+
parent_1.style.zIndex = String(zIndex);
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
};
|
|
272
272
|
|
|
273
|
+
NaverMintMapController.prototype.markerToTheTop = function (marker) {
|
|
274
|
+
this.setMarkerZIndex(marker, this.getMaxZIndex(1));
|
|
275
|
+
};
|
|
276
|
+
|
|
273
277
|
NaverMintMapController.prototype.clearDrawable = function (drawable) {
|
|
274
278
|
var _a;
|
|
275
279
|
|
|
@@ -277,9 +281,6 @@ var NaverMintMapController = function (_super) {
|
|
|
277
281
|
if (drawable.native instanceof naver.maps.Marker) {
|
|
278
282
|
if (this.mapProps.markerCache && this.markerPool) {
|
|
279
283
|
drawable.native.setVisible(false);
|
|
280
|
-
this.markerEvents.map(function (eName) {
|
|
281
|
-
drawable.native.clearListeners(eName);
|
|
282
|
-
});
|
|
283
284
|
(_a = this.markerPool) === null || _a === void 0 ? void 0 : _a.releasePoolItem(drawable.native);
|
|
284
285
|
} else {
|
|
285
286
|
drawable.native.setMap(null);
|
|
@@ -288,6 +289,7 @@ var NaverMintMapController = function (_super) {
|
|
|
288
289
|
drawable.native.setMap(null);
|
|
289
290
|
}
|
|
290
291
|
|
|
292
|
+
naver.maps.Event.clearInstanceListeners(drawable.native);
|
|
291
293
|
return true;
|
|
292
294
|
}
|
|
293
295
|
|
package/dist/index.es.js
CHANGED
|
@@ -657,16 +657,20 @@ var NaverMintMapController = function (_super) {
|
|
|
657
657
|
}
|
|
658
658
|
};
|
|
659
659
|
|
|
660
|
-
NaverMintMapController.prototype.
|
|
660
|
+
NaverMintMapController.prototype.setMarkerZIndex = function (marker, zIndex) {
|
|
661
661
|
if (this.map && marker.element && marker.element instanceof HTMLElement) {
|
|
662
662
|
var parent_1 = marker.element.parentElement;
|
|
663
663
|
|
|
664
664
|
if (parent_1) {
|
|
665
|
-
parent_1.style.zIndex = String(
|
|
665
|
+
parent_1.style.zIndex = String(zIndex);
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
668
|
};
|
|
669
669
|
|
|
670
|
+
NaverMintMapController.prototype.markerToTheTop = function (marker) {
|
|
671
|
+
this.setMarkerZIndex(marker, this.getMaxZIndex(1));
|
|
672
|
+
};
|
|
673
|
+
|
|
670
674
|
NaverMintMapController.prototype.clearDrawable = function (drawable) {
|
|
671
675
|
var _a;
|
|
672
676
|
|
|
@@ -674,9 +678,6 @@ var NaverMintMapController = function (_super) {
|
|
|
674
678
|
if (drawable.native instanceof naver.maps.Marker) {
|
|
675
679
|
if (this.mapProps.markerCache && this.markerPool) {
|
|
676
680
|
drawable.native.setVisible(false);
|
|
677
|
-
this.markerEvents.map(function (eName) {
|
|
678
|
-
drawable.native.clearListeners(eName);
|
|
679
|
-
});
|
|
680
681
|
(_a = this.markerPool) === null || _a === void 0 ? void 0 : _a.releasePoolItem(drawable.native);
|
|
681
682
|
} else {
|
|
682
683
|
drawable.native.setMap(null);
|
|
@@ -685,6 +686,7 @@ var NaverMintMapController = function (_super) {
|
|
|
685
686
|
drawable.native.setMap(null);
|
|
686
687
|
}
|
|
687
688
|
|
|
689
|
+
naver.maps.Event.clearInstanceListeners(drawable.native);
|
|
688
690
|
return true;
|
|
689
691
|
}
|
|
690
692
|
|
|
@@ -1165,12 +1167,22 @@ var GoogleMintMapController = function (_super) {
|
|
|
1165
1167
|
}
|
|
1166
1168
|
};
|
|
1167
1169
|
|
|
1168
|
-
GoogleMintMapController.prototype.
|
|
1170
|
+
GoogleMintMapController.prototype.setMarkerZIndex = function (marker, zIndex) {
|
|
1169
1171
|
if (this.map && marker.element && marker.element instanceof HTMLElement) {
|
|
1170
1172
|
var parent_1 = marker.element.parentElement;
|
|
1171
1173
|
|
|
1172
1174
|
if (parent_1) {
|
|
1173
|
-
parent_1.style.zIndex = String(
|
|
1175
|
+
parent_1.style.zIndex = String(zIndex);
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
};
|
|
1179
|
+
|
|
1180
|
+
GoogleMintMapController.prototype.markerToTheTop = function (marker) {
|
|
1181
|
+
if (this.map && marker.element && marker.element instanceof HTMLElement) {
|
|
1182
|
+
var parent_2 = marker.element.parentElement;
|
|
1183
|
+
|
|
1184
|
+
if (parent_2) {
|
|
1185
|
+
this.setMarkerZIndex(marker, this.getMaxZIndex(1, parent_2));
|
|
1174
1186
|
}
|
|
1175
1187
|
}
|
|
1176
1188
|
};
|
|
@@ -1178,9 +1190,11 @@ var GoogleMintMapController = function (_super) {
|
|
|
1178
1190
|
GoogleMintMapController.prototype.clearDrawable = function (drawable) {
|
|
1179
1191
|
if (drawable && drawable.native) {
|
|
1180
1192
|
if (drawable.native instanceof google.maps.Marker || drawable.native instanceof google.maps.Polygon || drawable.native instanceof google.maps.Polyline) {
|
|
1193
|
+
google.maps.event.clearInstanceListeners(drawable.native);
|
|
1181
1194
|
drawable.native.setMap(null);
|
|
1182
1195
|
return true;
|
|
1183
1196
|
} else if (drawable.native instanceof google.maps.marker.AdvancedMarkerView) {
|
|
1197
|
+
google.maps.event.clearInstanceListeners(drawable.native);
|
|
1184
1198
|
drawable.native.map = null;
|
|
1185
1199
|
return true;
|
|
1186
1200
|
}
|
|
@@ -1943,12 +1957,20 @@ function MapMarkerWrapper(_a) {
|
|
|
1943
1957
|
if (markerRef.current) {
|
|
1944
1958
|
controller.updateMarker(markerRef.current, options);
|
|
1945
1959
|
offsetCalibration(controller.getMapType(), divElement, options);
|
|
1960
|
+
|
|
1961
|
+
if (markerRef.current.options.zIndex !== undefined) {
|
|
1962
|
+
controller.setMarkerZIndex(markerRef.current, markerRef.current.options.zIndex);
|
|
1963
|
+
}
|
|
1946
1964
|
} else {
|
|
1947
1965
|
markerRef.current = new Marker(options);
|
|
1948
1966
|
markerRef.current.element = divElement;
|
|
1949
1967
|
controller.createMarker(markerRef.current);
|
|
1950
1968
|
offsetCalibration(controller.getMapType(), divElement, options);
|
|
1951
1969
|
|
|
1970
|
+
if (markerRef.current.options.zIndex !== undefined) {
|
|
1971
|
+
controller.setMarkerZIndex(markerRef.current, markerRef.current.options.zIndex);
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1952
1974
|
if (movingAnimation) {
|
|
1953
1975
|
setMovingState(__assign(__assign({}, movingAnimation), {
|
|
1954
1976
|
marker: markerRef.current
|
package/dist/index.umd.js
CHANGED
|
@@ -662,16 +662,20 @@
|
|
|
662
662
|
}
|
|
663
663
|
};
|
|
664
664
|
|
|
665
|
-
NaverMintMapController.prototype.
|
|
665
|
+
NaverMintMapController.prototype.setMarkerZIndex = function (marker, zIndex) {
|
|
666
666
|
if (this.map && marker.element && marker.element instanceof HTMLElement) {
|
|
667
667
|
var parent_1 = marker.element.parentElement;
|
|
668
668
|
|
|
669
669
|
if (parent_1) {
|
|
670
|
-
parent_1.style.zIndex = String(
|
|
670
|
+
parent_1.style.zIndex = String(zIndex);
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
673
|
};
|
|
674
674
|
|
|
675
|
+
NaverMintMapController.prototype.markerToTheTop = function (marker) {
|
|
676
|
+
this.setMarkerZIndex(marker, this.getMaxZIndex(1));
|
|
677
|
+
};
|
|
678
|
+
|
|
675
679
|
NaverMintMapController.prototype.clearDrawable = function (drawable) {
|
|
676
680
|
var _a;
|
|
677
681
|
|
|
@@ -679,9 +683,6 @@
|
|
|
679
683
|
if (drawable.native instanceof naver.maps.Marker) {
|
|
680
684
|
if (this.mapProps.markerCache && this.markerPool) {
|
|
681
685
|
drawable.native.setVisible(false);
|
|
682
|
-
this.markerEvents.map(function (eName) {
|
|
683
|
-
drawable.native.clearListeners(eName);
|
|
684
|
-
});
|
|
685
686
|
(_a = this.markerPool) === null || _a === void 0 ? void 0 : _a.releasePoolItem(drawable.native);
|
|
686
687
|
} else {
|
|
687
688
|
drawable.native.setMap(null);
|
|
@@ -690,6 +691,7 @@
|
|
|
690
691
|
drawable.native.setMap(null);
|
|
691
692
|
}
|
|
692
693
|
|
|
694
|
+
naver.maps.Event.clearInstanceListeners(drawable.native);
|
|
693
695
|
return true;
|
|
694
696
|
}
|
|
695
697
|
|
|
@@ -1170,12 +1172,22 @@
|
|
|
1170
1172
|
}
|
|
1171
1173
|
};
|
|
1172
1174
|
|
|
1173
|
-
GoogleMintMapController.prototype.
|
|
1175
|
+
GoogleMintMapController.prototype.setMarkerZIndex = function (marker, zIndex) {
|
|
1174
1176
|
if (this.map && marker.element && marker.element instanceof HTMLElement) {
|
|
1175
1177
|
var parent_1 = marker.element.parentElement;
|
|
1176
1178
|
|
|
1177
1179
|
if (parent_1) {
|
|
1178
|
-
parent_1.style.zIndex = String(
|
|
1180
|
+
parent_1.style.zIndex = String(zIndex);
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
};
|
|
1184
|
+
|
|
1185
|
+
GoogleMintMapController.prototype.markerToTheTop = function (marker) {
|
|
1186
|
+
if (this.map && marker.element && marker.element instanceof HTMLElement) {
|
|
1187
|
+
var parent_2 = marker.element.parentElement;
|
|
1188
|
+
|
|
1189
|
+
if (parent_2) {
|
|
1190
|
+
this.setMarkerZIndex(marker, this.getMaxZIndex(1, parent_2));
|
|
1179
1191
|
}
|
|
1180
1192
|
}
|
|
1181
1193
|
};
|
|
@@ -1183,9 +1195,11 @@
|
|
|
1183
1195
|
GoogleMintMapController.prototype.clearDrawable = function (drawable) {
|
|
1184
1196
|
if (drawable && drawable.native) {
|
|
1185
1197
|
if (drawable.native instanceof google.maps.Marker || drawable.native instanceof google.maps.Polygon || drawable.native instanceof google.maps.Polyline) {
|
|
1198
|
+
google.maps.event.clearInstanceListeners(drawable.native);
|
|
1186
1199
|
drawable.native.setMap(null);
|
|
1187
1200
|
return true;
|
|
1188
1201
|
} else if (drawable.native instanceof google.maps.marker.AdvancedMarkerView) {
|
|
1202
|
+
google.maps.event.clearInstanceListeners(drawable.native);
|
|
1189
1203
|
drawable.native.map = null;
|
|
1190
1204
|
return true;
|
|
1191
1205
|
}
|
|
@@ -1948,12 +1962,20 @@
|
|
|
1948
1962
|
if (markerRef.current) {
|
|
1949
1963
|
controller.updateMarker(markerRef.current, options);
|
|
1950
1964
|
offsetCalibration(controller.getMapType(), divElement, options);
|
|
1965
|
+
|
|
1966
|
+
if (markerRef.current.options.zIndex !== undefined) {
|
|
1967
|
+
controller.setMarkerZIndex(markerRef.current, markerRef.current.options.zIndex);
|
|
1968
|
+
}
|
|
1951
1969
|
} else {
|
|
1952
1970
|
markerRef.current = new Marker(options);
|
|
1953
1971
|
markerRef.current.element = divElement;
|
|
1954
1972
|
controller.createMarker(markerRef.current);
|
|
1955
1973
|
offsetCalibration(controller.getMapType(), divElement, options);
|
|
1956
1974
|
|
|
1975
|
+
if (markerRef.current.options.zIndex !== undefined) {
|
|
1976
|
+
controller.setMarkerZIndex(markerRef.current, markerRef.current.options.zIndex);
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1957
1979
|
if (movingAnimation) {
|
|
1958
1980
|
setMovingState(tslib.__assign(tslib.__assign({}, movingAnimation), {
|
|
1959
1981
|
marker: markerRef.current
|