|
|
@@ -448,18 +448,18 @@ const refreshStation = (location: any) => {
|
|
|
index === _markersIndex ? pointSize.currentHeight : pointSize.height,
|
|
|
label: {
|
|
|
content: `${item.availableParkingNum||0}/${item.parkingNum||0}`,
|
|
|
+ // content: `1/10`,
|
|
|
color: "#ffffff",
|
|
|
fontSize:
|
|
|
index === _markersIndex
|
|
|
? pointSize.currentFontSize
|
|
|
: pointSize.fontSize,
|
|
|
- textAlign: "center" ,
|
|
|
- // textAlign: isIOS.value ? "center" : "left",
|
|
|
+ textAlign: isIOS.value ? "center" : "left",
|
|
|
anchorX: isIOS.value
|
|
|
? 0
|
|
|
: index === _markersIndex
|
|
|
- ? pointSize.androidCurrentX
|
|
|
- : pointSize.androidX,
|
|
|
+ ? -17 // 针对安卓设备调整 anchorX 实现居中
|
|
|
+ : -10,
|
|
|
anchorY: -(
|
|
|
(index === _markersIndex
|
|
|
? pointSize.currentHeight
|
|
|
@@ -723,19 +723,17 @@ const _changeMarker = (current: number) => {
|
|
|
_markers[markersIndex.value].width = pointSize.width;
|
|
|
_markers[markersIndex.value].height = pointSize.height;
|
|
|
_markers[markersIndex.value].label.fontSize = pointSize.fontSize;
|
|
|
- _markers[markersIndex.value].label.anchorY = -(pointSize.height-3);
|
|
|
- if (!isIOS) {
|
|
|
- _markers[markersIndex.value].label.anchorX = pointSize.androidX;
|
|
|
- }
|
|
|
+ _markers[markersIndex.value].label.anchorY = -(pointSize.height - 3);
|
|
|
+ _markers[markersIndex.value].label.textAlign = isIOS.value ? "center" : "left";
|
|
|
+ _markers[markersIndex.value].label.anchorX = isIOS.value ? 0 : -10;
|
|
|
|
|
|
_markers[markersNewIndex].iconPath = pointSize.currentIconPath;
|
|
|
_markers[markersNewIndex].width = pointSize.currentWidth;
|
|
|
_markers[markersNewIndex].height = pointSize.currentHeight;
|
|
|
_markers[markersNewIndex].label.fontSize = pointSize.currentFontSize;
|
|
|
+ _markers[markersNewIndex].label.textAlign = isIOS.value ? "center" : "left";
|
|
|
_markers[markersNewIndex].label.anchorY = -(pointSize.currentHeight - 3);
|
|
|
- if (!isIOS) {
|
|
|
- _markers[markersNewIndex].label.anchorX = pointSize.androidCurrentX;
|
|
|
- }
|
|
|
+ _markers[markersNewIndex].label.anchorX = isIOS.value ? 0 : -17;
|
|
|
|
|
|
isIgnoreChangeLocation = true;
|
|
|
markers.value = _markers;
|