@heycar/heycars-map 0.8.0 → 0.8.1
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 +112 -0
- package/dist/index.cjs +104 -34
- package/dist/index.js +104 -34
- package/dist/src/business-components/BusinessQuotingMap/BusinessQuotingMap.d.ts +4 -2
- package/dist/src/business-components/StartEndPoint/StartEndPoint.css.d.ts +16 -0
- package/dist/src/business-components/StartEndPoint/StartEndPoint.d.ts +6 -3
- package/dist/style.css +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -88,6 +88,7 @@ export interface RecommendZonePlaces {
|
|
|
88
88
|
为了方便集成,已经将常用业务逻辑集成在四个业务组件里面,下面是推荐使用的业务组件
|
|
89
89
|
|
|
90
90
|
- `BusinessRecomendPlaceMap`
|
|
91
|
+
- `BusinessReselectPlaceMap`
|
|
91
92
|
- `BusinessQuotingMap`
|
|
92
93
|
- `BusinessTaxiServiceMap`
|
|
93
94
|
- `BusinessTaxiEndMap`
|
|
@@ -95,6 +96,7 @@ export interface RecommendZonePlaces {
|
|
|
95
96
|
下面三个是推荐搭配使用的业务 hooks
|
|
96
97
|
|
|
97
98
|
- `useBusinessRecomendPlaceMap`
|
|
99
|
+
- `useBusinessReselectPlaceMap`
|
|
98
100
|
- `useBusinessQuotingMap`
|
|
99
101
|
- `useBusinessTaxiServiceMap`
|
|
100
102
|
|
|
@@ -215,6 +217,114 @@ export default defineComponent({
|
|
|
215
217
|
});
|
|
216
218
|
```
|
|
217
219
|
|
|
220
|
+
#### 选择上车点和推荐点的地图组件 `BusinessReselectPlaceMap`
|
|
221
|
+
|
|
222
|
+
对于 jsx/tsx 文件的例子
|
|
223
|
+
|
|
224
|
+
```jsx
|
|
225
|
+
import { defineComponent } from "vue";
|
|
226
|
+
import { BusinessReselectPlaceMap, useBusinessReselectPlaceMap } from "@heycar/heycars-map";
|
|
227
|
+
|
|
228
|
+
export default defineComponent({
|
|
229
|
+
setup() {
|
|
230
|
+
const {
|
|
231
|
+
centerPlace,
|
|
232
|
+
mapContext,
|
|
233
|
+
setCenterPlaceByUserSpecified,
|
|
234
|
+
setCenterPlaceByUserSpecifiedInZone,
|
|
235
|
+
} = useBusinessReselectPlaceMap();
|
|
236
|
+
// 演示 setCenterPlaceByUserSpecifiedInZone 的用法
|
|
237
|
+
const demoForUsage = () => {
|
|
238
|
+
setCenterPlaceByUserSpecifiedInZone({
|
|
239
|
+
// 期望的地图中心点
|
|
240
|
+
place: {
|
|
241
|
+
lng: 139.56,
|
|
242
|
+
lat: 35.56,
|
|
243
|
+
name: "user specified place in zone",
|
|
244
|
+
displayName: "user specified place in zone",
|
|
245
|
+
},
|
|
246
|
+
// 推荐点和绿区信息
|
|
247
|
+
recommends: {
|
|
248
|
+
// 绿区
|
|
249
|
+
zone: {
|
|
250
|
+
name: "zone 1",
|
|
251
|
+
path: [
|
|
252
|
+
[139.569, 35.555],
|
|
253
|
+
[139.558, 35.55],
|
|
254
|
+
[139.56, 35.565],
|
|
255
|
+
],
|
|
256
|
+
},
|
|
257
|
+
// 绿区内的推荐点列表
|
|
258
|
+
places: [
|
|
259
|
+
{
|
|
260
|
+
lng: 139.56,
|
|
261
|
+
lat: 35.56,
|
|
262
|
+
name: "user specified place in zone",
|
|
263
|
+
displayName: "user specified place in zone",
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
lng: 139.562,
|
|
267
|
+
lat: 35.562,
|
|
268
|
+
name: "recommend place 2",
|
|
269
|
+
displayName: "recommend place 2",
|
|
270
|
+
},
|
|
271
|
+
],
|
|
272
|
+
},
|
|
273
|
+
});
|
|
274
|
+
};
|
|
275
|
+
return () => (
|
|
276
|
+
<BusinessReselectPlaceMap
|
|
277
|
+
class={"demo"}
|
|
278
|
+
unavailableTitle={"当前区域暂未开通服务"}
|
|
279
|
+
recomendDescription={"您将在此处上车"}
|
|
280
|
+
defaultPlace={{
|
|
281
|
+
lng: 139.777777,
|
|
282
|
+
lat: 35.777777,
|
|
283
|
+
name: "default place name",
|
|
284
|
+
displayName: "default place display name",
|
|
285
|
+
}}
|
|
286
|
+
getRecomendPlace={async ({ lng, lat }) => {
|
|
287
|
+
// 向后端获取推荐点信息
|
|
288
|
+
return {
|
|
289
|
+
// 服务是否可用
|
|
290
|
+
available: true,
|
|
291
|
+
// 绿区
|
|
292
|
+
zone: {
|
|
293
|
+
name: "绿区名称",
|
|
294
|
+
path: [
|
|
295
|
+
[lng - 0.001, lat + 0.001],
|
|
296
|
+
[lng, lat - 0.001],
|
|
297
|
+
[lng + 0.001, lat + 0.0005],
|
|
298
|
+
],
|
|
299
|
+
},
|
|
300
|
+
// 推荐点列表
|
|
301
|
+
places: [
|
|
302
|
+
{ lat: lat - 0.00001, lng: lng + 0.0001, name: "place 1", displayName: "place 1" },
|
|
303
|
+
{ lat: lat - 0.0002, lng: lng + 0.0002, name: "place 2", displayName: "place 2" },
|
|
304
|
+
{ lat: lat - 0.0002, lng: lng - 0.0001, name: "place 3", displayName: "place 3" },
|
|
305
|
+
],
|
|
306
|
+
};
|
|
307
|
+
}}
|
|
308
|
+
onChangeRecomandPlace={({ place, inputPlace, isInZone }) => {
|
|
309
|
+
console.log("用户操作地图,计算推荐点后得出的最终位置时触发,此时可以向后端查询城市信息");
|
|
310
|
+
console.log(
|
|
311
|
+
"计算推荐点之前的地址是: ",
|
|
312
|
+
inputPlace,
|
|
313
|
+
" 最终的地址是: ",
|
|
314
|
+
place,
|
|
315
|
+
" 是否在绿区内: ",
|
|
316
|
+
isInZone
|
|
317
|
+
);
|
|
318
|
+
}}
|
|
319
|
+
onGeoError={() => {
|
|
320
|
+
console.log("获取GPS失败时触发,此时可以弹框告诉用户");
|
|
321
|
+
}}
|
|
322
|
+
/>
|
|
323
|
+
);
|
|
324
|
+
},
|
|
325
|
+
});
|
|
326
|
+
```
|
|
327
|
+
|
|
218
328
|
#### 询价业务的地图组件 `BusinessQuotingMap`
|
|
219
329
|
|
|
220
330
|
对于 jsx/tsx 文件的例子
|
|
@@ -247,6 +357,8 @@ export default defineComponent({
|
|
|
247
357
|
}
|
|
248
358
|
mapRef={setMap}
|
|
249
359
|
registerOverlay={registerFitVeiw}
|
|
360
|
+
onClickStartPoint={(place) => console.log("点击起点时触发 palce = ", place)}
|
|
361
|
+
onClickEndPoint={(place) => console.log("点击终点时触发 palce = ", place)}
|
|
250
362
|
/>
|
|
251
363
|
);
|
|
252
364
|
},
|
package/dist/index.cjs
CHANGED
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
9
9
|
const Vue = require("vue");
|
|
10
10
|
const style = "";
|
|
11
11
|
const name = "@heycar/heycars-map";
|
|
12
|
-
const version = "0.8.
|
|
12
|
+
const version = "0.8.1";
|
|
13
13
|
const type = "module";
|
|
14
14
|
const scripts = {
|
|
15
15
|
dev: "vite -c vite.config.dev.ts",
|
|
@@ -727,7 +727,7 @@ var createRuntimeFn = (config) => (options) => {
|
|
|
727
727
|
};
|
|
728
728
|
var absoluteAddressBox = "n8tgem1";
|
|
729
729
|
var absoluteAddressBoxLayout = "n8tgem0";
|
|
730
|
-
var arrowRight = "n8tgem8";
|
|
730
|
+
var arrowRight$1 = "n8tgem8";
|
|
731
731
|
var boxDescription = "n8tgem6";
|
|
732
732
|
var boxTextLayout = createRuntimeFn({ defaultClassName: "n8tgem2", variantClassNames: { withArrow: { true: "n8tgem3", false: "n8tgem4" } }, defaultVariants: {}, compoundVariants: [] });
|
|
733
733
|
var boxTitle = "n8tgem5";
|
|
@@ -796,7 +796,7 @@ const AbsoluteAddressBox = defineSetup(function AbsoluteAddressBox2(props, {
|
|
|
796
796
|
}), !!description && Vue.h("div", {
|
|
797
797
|
"class": boxDescription
|
|
798
798
|
}, [description])]), withArrow && Vue.h("img", {
|
|
799
|
-
"class": arrowRight,
|
|
799
|
+
"class": arrowRight$1,
|
|
800
800
|
"attrs": {
|
|
801
801
|
"src": imgArrowRight
|
|
802
802
|
}
|
|
@@ -3209,6 +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SAxNy4wNzUgMCAxMSAwUzAgNC45MDEgMCAxMC45NDdjMCAzLjkxOCAyLjA2OCA3LjM1NSA1LjE3NyA5LjI5QzExLjc1IDIzLjI3NyA5LjA2IDI3IDExIDI3eiIgc3Ryb2tlPSIjRkZGIiBmaWxsPSJ1cmwoI3ByZWZpeF9fYSkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMS4yMTUpIi8+PHRleHQgZm9udC1mYW1pbHk9IlBpbmdGYW5nU0MtU2VtaWJvbGQsIFBpbmdGYW5nIFNDIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0iNTAwIiBmaWxsPSIjRkZGIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEuMjE1KSI+PHRzcGFuIHg9IjUiIHk9IjE1LjYyNCI+6LW3PC90c3Bhbj48L3RleHQ+PC9nPjwvc3ZnPg==";
|
|
3211
3211
|
const StartEndPoint_css_ts_vanilla = "";
|
|
3212
|
+
var arrowRight = createRuntimeFn({ defaultClassName: "_4a4ovka", variantClassNames: { withArrow: { true: "_4a4ovkb", false: "_4a4ovkc" } }, defaultVariants: {}, compoundVariants: [] });
|
|
3212
3213
|
var pointIcon = createRuntimeFn({ defaultClassName: "", variantClassNames: { type: { start: "_4a4ovk6", end: "_4a4ovk7" } }, defaultVariants: {}, compoundVariants: [] });
|
|
3213
3214
|
var pointInfoBox = "_4a4ovk1";
|
|
3214
3215
|
var pointInfoBoxDescription = "_4a4ovk4";
|
|
@@ -3216,38 +3217,61 @@ var pointInfoBoxEmphasize$1 = "_4a4ovk5";
|
|
|
3216
3217
|
var pointInfoBoxTitle = "_4a4ovk3";
|
|
3217
3218
|
var pointLayout$1 = "_4a4ovk0";
|
|
3218
3219
|
var pointSingleInfoBox$1 = "_4a4ovk2";
|
|
3219
|
-
|
|
3220
|
+
var textLayout = createRuntimeFn({ defaultClassName: "", variantClassNames: { withArrow: { true: "_4a4ovk8", false: "_4a4ovk9" } }, defaultVariants: {}, compoundVariants: [] });
|
|
3221
|
+
const AStartEndPoint = defineSetup(function AStartEndPoint2(props, {
|
|
3222
|
+
emit
|
|
3223
|
+
}) {
|
|
3220
3224
|
const contentRef = Vue.computed(() => {
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
+
const {
|
|
3226
|
+
withArrow = false,
|
|
3227
|
+
title,
|
|
3228
|
+
description,
|
|
3229
|
+
type: type2
|
|
3230
|
+
} = props;
|
|
3231
|
+
const icon = type2 === "start" ? imgStartPoint : imgEndPoint;
|
|
3232
|
+
const descriptionRow = !description ? "" : decodeAsterisk(description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize$1}">${item.value}</span>`).join("");
|
|
3233
|
+
if (!description && !title)
|
|
3225
3234
|
return `<img class="AStartEndPoint ${pointIcon({
|
|
3226
|
-
type:
|
|
3235
|
+
type: type2
|
|
3227
3236
|
})}" src="${icon}">`;
|
|
3228
|
-
if (!
|
|
3237
|
+
if (!description)
|
|
3229
3238
|
return `
|
|
3230
3239
|
<div class="AStartEndPoint ${pointLayout$1}">
|
|
3231
3240
|
<div class="${pointSingleInfoBox$1}">
|
|
3232
|
-
<div class="${pointInfoBoxTitle}
|
|
3241
|
+
<div class="${pointInfoBoxTitle} ${textLayout({
|
|
3242
|
+
withArrow
|
|
3243
|
+
})}">${title}</div>
|
|
3244
|
+
<img class="${arrowRight({
|
|
3245
|
+
withArrow
|
|
3246
|
+
})}" src="${imgArrowRight}" />
|
|
3233
3247
|
</div>
|
|
3234
3248
|
<img src="${icon}" class="${pointIcon({
|
|
3235
|
-
type:
|
|
3249
|
+
type: type2
|
|
3236
3250
|
})}">
|
|
3237
3251
|
</div>
|
|
3238
3252
|
`;
|
|
3239
3253
|
return `
|
|
3240
3254
|
<div class="AStartEndPoint ${pointLayout$1}">
|
|
3241
3255
|
<div class="${pointInfoBox}">
|
|
3242
|
-
<div class="${
|
|
3243
|
-
|
|
3256
|
+
<div class="${textLayout({
|
|
3257
|
+
withArrow
|
|
3258
|
+
})}">
|
|
3259
|
+
<div class="${pointInfoBoxTitle}">${title != null ? title : ""}</div>
|
|
3260
|
+
<div class="${pointInfoBoxDescription}">${descriptionRow}</div>
|
|
3261
|
+
</div>
|
|
3262
|
+
<img class="${arrowRight({
|
|
3263
|
+
withArrow
|
|
3264
|
+
})}" src="${imgArrowRight}" />
|
|
3244
3265
|
</div>
|
|
3245
3266
|
<img src="${icon}" class="${pointIcon({
|
|
3246
|
-
type:
|
|
3267
|
+
type: type2
|
|
3247
3268
|
})}">
|
|
3248
3269
|
</div>
|
|
3249
3270
|
`;
|
|
3250
3271
|
});
|
|
3272
|
+
const handleClick = () => {
|
|
3273
|
+
emit("click", props.position);
|
|
3274
|
+
};
|
|
3251
3275
|
return () => Vue.h(AmapMarker, {
|
|
3252
3276
|
"attrs": {
|
|
3253
3277
|
"registerOverlay": props.registerOverlay,
|
|
@@ -3255,44 +3279,69 @@ const AStartEndPoint = defineSetup(function AStartEndPoint2(props) {
|
|
|
3255
3279
|
"content": contentRef.value,
|
|
3256
3280
|
"anchor": "bottom-center",
|
|
3257
3281
|
"zIndex": ZINDEX_START_END_LOGO_LAYER
|
|
3282
|
+
},
|
|
3283
|
+
"on": {
|
|
3284
|
+
"click": handleClick
|
|
3258
3285
|
}
|
|
3259
3286
|
});
|
|
3260
3287
|
});
|
|
3261
|
-
const GStartEndPoint = defineSetup(function GStartEndPoint2(props
|
|
3288
|
+
const GStartEndPoint = defineSetup(function GStartEndPoint2(props, {
|
|
3289
|
+
emit
|
|
3290
|
+
}) {
|
|
3262
3291
|
const contentRef = Vue.computed(() => {
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3292
|
+
const {
|
|
3293
|
+
withArrow = false,
|
|
3294
|
+
title,
|
|
3295
|
+
description,
|
|
3296
|
+
type: type2
|
|
3297
|
+
} = props;
|
|
3298
|
+
const icon = type2 === "start" ? imgStartPoint : imgEndPoint;
|
|
3299
|
+
const descriptionRow = !description ? "" : decodeAsterisk(description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize$1}">${item.value}</span>`).join("");
|
|
3300
|
+
if (!description && !title)
|
|
3267
3301
|
return createDom("img", {
|
|
3268
3302
|
class: `GStartEndPoint ${pointIcon({
|
|
3269
|
-
type:
|
|
3303
|
+
type: type2
|
|
3270
3304
|
})}`,
|
|
3271
3305
|
src: icon
|
|
3272
3306
|
});
|
|
3273
|
-
if (!
|
|
3307
|
+
if (!description)
|
|
3274
3308
|
return createDom("div", {
|
|
3275
3309
|
class: `GStartEndPoint ${pointLayout$1}`
|
|
3276
3310
|
}, `
|
|
3277
3311
|
<div class="${pointSingleInfoBox$1}">
|
|
3278
|
-
<div class="${pointInfoBoxTitle}
|
|
3312
|
+
<div class="${pointInfoBoxTitle} ${textLayout({
|
|
3313
|
+
withArrow
|
|
3314
|
+
})}">${title}</div>
|
|
3315
|
+
<img class="${arrowRight({
|
|
3316
|
+
withArrow
|
|
3317
|
+
})}" src="${imgArrowRight}" />
|
|
3279
3318
|
</div>
|
|
3280
3319
|
<img src="${icon}" class="${pointIcon({
|
|
3281
|
-
type:
|
|
3320
|
+
type: type2
|
|
3282
3321
|
})}">
|
|
3283
3322
|
`);
|
|
3284
3323
|
return createDom("div", {
|
|
3285
3324
|
class: `GStartEndPoint ${pointLayout$1}`
|
|
3286
3325
|
}, `
|
|
3287
3326
|
<div class="${pointInfoBox}">
|
|
3288
|
-
<div class="${
|
|
3289
|
-
|
|
3327
|
+
<div class="${textLayout({
|
|
3328
|
+
withArrow
|
|
3329
|
+
})}">
|
|
3330
|
+
<div class="${pointInfoBoxTitle}">${title != null ? title : ""}</div>
|
|
3331
|
+
<div class="${pointInfoBoxDescription}">${descriptionRow}</div>
|
|
3332
|
+
</div>
|
|
3333
|
+
<img class="${arrowRight({
|
|
3334
|
+
withArrow
|
|
3335
|
+
})}" src="${imgArrowRight}" />
|
|
3290
3336
|
</div>
|
|
3291
3337
|
<img src="${icon}" class="${pointIcon({
|
|
3292
|
-
type:
|
|
3338
|
+
type: type2
|
|
3293
3339
|
})}">
|
|
3294
3340
|
`);
|
|
3295
3341
|
});
|
|
3342
|
+
const handleClick = () => {
|
|
3343
|
+
emit("click", props.position);
|
|
3344
|
+
};
|
|
3296
3345
|
return () => {
|
|
3297
3346
|
return Vue.h(GmapAdvancedMarkerView, {
|
|
3298
3347
|
"attrs": {
|
|
@@ -3300,19 +3349,29 @@ const GStartEndPoint = defineSetup(function GStartEndPoint2(props) {
|
|
|
3300
3349
|
"position": vec2lnglat(props.position),
|
|
3301
3350
|
"content": contentRef.value,
|
|
3302
3351
|
"zIndex": ZINDEX_START_END_LOGO_LAYER
|
|
3352
|
+
},
|
|
3353
|
+
"on": {
|
|
3354
|
+
"click": handleClick
|
|
3303
3355
|
}
|
|
3304
3356
|
});
|
|
3305
3357
|
};
|
|
3306
3358
|
});
|
|
3307
|
-
const StartEndPoint = defineSetup(function StartEndPoint2(props
|
|
3359
|
+
const StartEndPoint = defineSetup(function StartEndPoint2(props, {
|
|
3360
|
+
emit
|
|
3361
|
+
}) {
|
|
3308
3362
|
const payload = useMapSupplier();
|
|
3309
3363
|
return () => {
|
|
3310
3364
|
return createElement(payload.supplier === "gmap" ? GStartEndPoint : AStartEndPoint, {
|
|
3311
|
-
attrs: props
|
|
3365
|
+
attrs: props,
|
|
3366
|
+
on: {
|
|
3367
|
+
click: (value) => emit("click", value)
|
|
3368
|
+
}
|
|
3312
3369
|
});
|
|
3313
3370
|
};
|
|
3314
3371
|
});
|
|
3315
|
-
const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props
|
|
3372
|
+
const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props, {
|
|
3373
|
+
emit
|
|
3374
|
+
}) {
|
|
3316
3375
|
const {
|
|
3317
3376
|
registerOverlay,
|
|
3318
3377
|
mapRef,
|
|
@@ -3345,7 +3404,11 @@ const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props)
|
|
|
3345
3404
|
"registerOverlay": registerOverlay,
|
|
3346
3405
|
"position": from,
|
|
3347
3406
|
"title": fromPlace.displayName,
|
|
3348
|
-
"description": fromDescription
|
|
3407
|
+
"description": fromDescription,
|
|
3408
|
+
"withArrow": true
|
|
3409
|
+
},
|
|
3410
|
+
"on": {
|
|
3411
|
+
"click": () => emit("clickStartPoint", fromPlace)
|
|
3349
3412
|
}
|
|
3350
3413
|
}), Vue.h(DrivingRoute, {
|
|
3351
3414
|
"attrs": {
|
|
@@ -3368,7 +3431,11 @@ const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props)
|
|
|
3368
3431
|
"description": renderDescription({
|
|
3369
3432
|
distance,
|
|
3370
3433
|
duration
|
|
3371
|
-
})
|
|
3434
|
+
}),
|
|
3435
|
+
"withArrow": true
|
|
3436
|
+
},
|
|
3437
|
+
"on": {
|
|
3438
|
+
"click": () => emit("clickEndPoint", toPlace)
|
|
3372
3439
|
}
|
|
3373
3440
|
})]
|
|
3374
3441
|
}
|
|
@@ -3441,6 +3508,10 @@ function compatibaleAddEventListenerDeviceOrientation(handler) {
|
|
|
3441
3508
|
addEventListener("touchend", handleTouchEnd);
|
|
3442
3509
|
return;
|
|
3443
3510
|
}
|
|
3511
|
+
if (typeof DeviceOrientationEvent === "undefined") {
|
|
3512
|
+
console.warn("My Warning: ios not support DeviceOrientationEvent");
|
|
3513
|
+
return;
|
|
3514
|
+
}
|
|
3444
3515
|
DeviceOrientationEvent == null ? void 0 : DeviceOrientationEvent.requestPermission().then((permissionState) => {
|
|
3445
3516
|
if (permissionState === "granted") {
|
|
3446
3517
|
isIOSDeviceOrientationPermissionGranted = true;
|
|
@@ -6089,8 +6160,7 @@ const APlaceCircle = defineSetup(function APlaceCircle2(props, {
|
|
|
6089
6160
|
textAlign: textAlignRef.value
|
|
6090
6161
|
})}" src="${imgPlaceCircle}">`;
|
|
6091
6162
|
});
|
|
6092
|
-
const handleClick = (
|
|
6093
|
-
console.log("AmapMarker click e = ", e);
|
|
6163
|
+
const handleClick = () => {
|
|
6094
6164
|
emit("click", props.position);
|
|
6095
6165
|
};
|
|
6096
6166
|
return () => {
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7
7
|
import Vue, { defineComponent, h, computed, inject, provide, watch, onMounted, onUnmounted, watchPostEffect, shallowRef, ref, watchEffect, reactive, toRefs, toRef } from "vue";
|
|
8
8
|
const style = "";
|
|
9
9
|
const name = "@heycar/heycars-map";
|
|
10
|
-
const version = "0.8.
|
|
10
|
+
const version = "0.8.1";
|
|
11
11
|
const type = "module";
|
|
12
12
|
const scripts = {
|
|
13
13
|
dev: "vite -c vite.config.dev.ts",
|
|
@@ -725,7 +725,7 @@ var createRuntimeFn = (config) => (options) => {
|
|
|
725
725
|
};
|
|
726
726
|
var absoluteAddressBox = "n8tgem1";
|
|
727
727
|
var absoluteAddressBoxLayout = "n8tgem0";
|
|
728
|
-
var arrowRight = "n8tgem8";
|
|
728
|
+
var arrowRight$1 = "n8tgem8";
|
|
729
729
|
var boxDescription = "n8tgem6";
|
|
730
730
|
var boxTextLayout = createRuntimeFn({ defaultClassName: "n8tgem2", variantClassNames: { withArrow: { true: "n8tgem3", false: "n8tgem4" } }, defaultVariants: {}, compoundVariants: [] });
|
|
731
731
|
var boxTitle = "n8tgem5";
|
|
@@ -794,7 +794,7 @@ const AbsoluteAddressBox = defineSetup(function AbsoluteAddressBox2(props, {
|
|
|
794
794
|
}), !!description && h("div", {
|
|
795
795
|
"class": boxDescription
|
|
796
796
|
}, [description])]), withArrow && h("img", {
|
|
797
|
-
"class": arrowRight,
|
|
797
|
+
"class": arrowRight$1,
|
|
798
798
|
"attrs": {
|
|
799
799
|
"src": imgArrowRight
|
|
800
800
|
}
|
|
@@ -3207,6 +3207,7 @@ const KeyedFitView = defineSetup(function KeyedFitView2(props, {
|
|
|
3207
3207
|
const imgEndPoint = "data:image/svg+xml;base64,PHN2ZyB3aW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jc1IDIzLjI3NyA5LjA2IDI3IDExIDI3eiIgc3Ryb2tlPSIjRkZGIiBmaWxsPSJ1cmwoI3ByZWZpeF9fYSkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEgMS4yMTUpIi8+PHRleHQgZm9udC1mYW1pbHk9IlBpbmdGYW5nU0MtU2VtaWJvbGQsIFBpbmdGYW5nIFNDIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0iNTAwIiBmaWxsPSIjRkZGIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxIDEuMjE1KSI+PHRzcGFuIHg9IjUiIHk9IjE1LjYyNCI+6LW3PC90c3Bhbj48L3RleHQ+PC9nPjwvc3ZnPg==";
|
|
3209
3209
|
const StartEndPoint_css_ts_vanilla = "";
|
|
3210
|
+
var arrowRight = createRuntimeFn({ defaultClassName: "_4a4ovka", variantClassNames: { withArrow: { true: "_4a4ovkb", false: "_4a4ovkc" } }, defaultVariants: {}, compoundVariants: [] });
|
|
3210
3211
|
var pointIcon = createRuntimeFn({ defaultClassName: "", variantClassNames: { type: { start: "_4a4ovk6", end: "_4a4ovk7" } }, defaultVariants: {}, compoundVariants: [] });
|
|
3211
3212
|
var pointInfoBox = "_4a4ovk1";
|
|
3212
3213
|
var pointInfoBoxDescription = "_4a4ovk4";
|
|
@@ -3214,38 +3215,61 @@ var pointInfoBoxEmphasize$1 = "_4a4ovk5";
|
|
|
3214
3215
|
var pointInfoBoxTitle = "_4a4ovk3";
|
|
3215
3216
|
var pointLayout$1 = "_4a4ovk0";
|
|
3216
3217
|
var pointSingleInfoBox$1 = "_4a4ovk2";
|
|
3217
|
-
|
|
3218
|
+
var textLayout = createRuntimeFn({ defaultClassName: "", variantClassNames: { withArrow: { true: "_4a4ovk8", false: "_4a4ovk9" } }, defaultVariants: {}, compoundVariants: [] });
|
|
3219
|
+
const AStartEndPoint = defineSetup(function AStartEndPoint2(props, {
|
|
3220
|
+
emit
|
|
3221
|
+
}) {
|
|
3218
3222
|
const contentRef = computed(() => {
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
+
const {
|
|
3224
|
+
withArrow = false,
|
|
3225
|
+
title,
|
|
3226
|
+
description,
|
|
3227
|
+
type: type2
|
|
3228
|
+
} = props;
|
|
3229
|
+
const icon = type2 === "start" ? imgStartPoint : imgEndPoint;
|
|
3230
|
+
const descriptionRow = !description ? "" : decodeAsterisk(description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize$1}">${item.value}</span>`).join("");
|
|
3231
|
+
if (!description && !title)
|
|
3223
3232
|
return `<img class="AStartEndPoint ${pointIcon({
|
|
3224
|
-
type:
|
|
3233
|
+
type: type2
|
|
3225
3234
|
})}" src="${icon}">`;
|
|
3226
|
-
if (!
|
|
3235
|
+
if (!description)
|
|
3227
3236
|
return `
|
|
3228
3237
|
<div class="AStartEndPoint ${pointLayout$1}">
|
|
3229
3238
|
<div class="${pointSingleInfoBox$1}">
|
|
3230
|
-
<div class="${pointInfoBoxTitle}
|
|
3239
|
+
<div class="${pointInfoBoxTitle} ${textLayout({
|
|
3240
|
+
withArrow
|
|
3241
|
+
})}">${title}</div>
|
|
3242
|
+
<img class="${arrowRight({
|
|
3243
|
+
withArrow
|
|
3244
|
+
})}" src="${imgArrowRight}" />
|
|
3231
3245
|
</div>
|
|
3232
3246
|
<img src="${icon}" class="${pointIcon({
|
|
3233
|
-
type:
|
|
3247
|
+
type: type2
|
|
3234
3248
|
})}">
|
|
3235
3249
|
</div>
|
|
3236
3250
|
`;
|
|
3237
3251
|
return `
|
|
3238
3252
|
<div class="AStartEndPoint ${pointLayout$1}">
|
|
3239
3253
|
<div class="${pointInfoBox}">
|
|
3240
|
-
<div class="${
|
|
3241
|
-
|
|
3254
|
+
<div class="${textLayout({
|
|
3255
|
+
withArrow
|
|
3256
|
+
})}">
|
|
3257
|
+
<div class="${pointInfoBoxTitle}">${title != null ? title : ""}</div>
|
|
3258
|
+
<div class="${pointInfoBoxDescription}">${descriptionRow}</div>
|
|
3259
|
+
</div>
|
|
3260
|
+
<img class="${arrowRight({
|
|
3261
|
+
withArrow
|
|
3262
|
+
})}" src="${imgArrowRight}" />
|
|
3242
3263
|
</div>
|
|
3243
3264
|
<img src="${icon}" class="${pointIcon({
|
|
3244
|
-
type:
|
|
3265
|
+
type: type2
|
|
3245
3266
|
})}">
|
|
3246
3267
|
</div>
|
|
3247
3268
|
`;
|
|
3248
3269
|
});
|
|
3270
|
+
const handleClick = () => {
|
|
3271
|
+
emit("click", props.position);
|
|
3272
|
+
};
|
|
3249
3273
|
return () => h(AmapMarker, {
|
|
3250
3274
|
"attrs": {
|
|
3251
3275
|
"registerOverlay": props.registerOverlay,
|
|
@@ -3253,44 +3277,69 @@ const AStartEndPoint = defineSetup(function AStartEndPoint2(props) {
|
|
|
3253
3277
|
"content": contentRef.value,
|
|
3254
3278
|
"anchor": "bottom-center",
|
|
3255
3279
|
"zIndex": ZINDEX_START_END_LOGO_LAYER
|
|
3280
|
+
},
|
|
3281
|
+
"on": {
|
|
3282
|
+
"click": handleClick
|
|
3256
3283
|
}
|
|
3257
3284
|
});
|
|
3258
3285
|
});
|
|
3259
|
-
const GStartEndPoint = defineSetup(function GStartEndPoint2(props
|
|
3286
|
+
const GStartEndPoint = defineSetup(function GStartEndPoint2(props, {
|
|
3287
|
+
emit
|
|
3288
|
+
}) {
|
|
3260
3289
|
const contentRef = computed(() => {
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3290
|
+
const {
|
|
3291
|
+
withArrow = false,
|
|
3292
|
+
title,
|
|
3293
|
+
description,
|
|
3294
|
+
type: type2
|
|
3295
|
+
} = props;
|
|
3296
|
+
const icon = type2 === "start" ? imgStartPoint : imgEndPoint;
|
|
3297
|
+
const descriptionRow = !description ? "" : decodeAsterisk(description).map((item) => item.type === "normal" ? item.value : `<span class="${pointInfoBoxEmphasize$1}">${item.value}</span>`).join("");
|
|
3298
|
+
if (!description && !title)
|
|
3265
3299
|
return createDom("img", {
|
|
3266
3300
|
class: `GStartEndPoint ${pointIcon({
|
|
3267
|
-
type:
|
|
3301
|
+
type: type2
|
|
3268
3302
|
})}`,
|
|
3269
3303
|
src: icon
|
|
3270
3304
|
});
|
|
3271
|
-
if (!
|
|
3305
|
+
if (!description)
|
|
3272
3306
|
return createDom("div", {
|
|
3273
3307
|
class: `GStartEndPoint ${pointLayout$1}`
|
|
3274
3308
|
}, `
|
|
3275
3309
|
<div class="${pointSingleInfoBox$1}">
|
|
3276
|
-
<div class="${pointInfoBoxTitle}
|
|
3310
|
+
<div class="${pointInfoBoxTitle} ${textLayout({
|
|
3311
|
+
withArrow
|
|
3312
|
+
})}">${title}</div>
|
|
3313
|
+
<img class="${arrowRight({
|
|
3314
|
+
withArrow
|
|
3315
|
+
})}" src="${imgArrowRight}" />
|
|
3277
3316
|
</div>
|
|
3278
3317
|
<img src="${icon}" class="${pointIcon({
|
|
3279
|
-
type:
|
|
3318
|
+
type: type2
|
|
3280
3319
|
})}">
|
|
3281
3320
|
`);
|
|
3282
3321
|
return createDom("div", {
|
|
3283
3322
|
class: `GStartEndPoint ${pointLayout$1}`
|
|
3284
3323
|
}, `
|
|
3285
3324
|
<div class="${pointInfoBox}">
|
|
3286
|
-
<div class="${
|
|
3287
|
-
|
|
3325
|
+
<div class="${textLayout({
|
|
3326
|
+
withArrow
|
|
3327
|
+
})}">
|
|
3328
|
+
<div class="${pointInfoBoxTitle}">${title != null ? title : ""}</div>
|
|
3329
|
+
<div class="${pointInfoBoxDescription}">${descriptionRow}</div>
|
|
3330
|
+
</div>
|
|
3331
|
+
<img class="${arrowRight({
|
|
3332
|
+
withArrow
|
|
3333
|
+
})}" src="${imgArrowRight}" />
|
|
3288
3334
|
</div>
|
|
3289
3335
|
<img src="${icon}" class="${pointIcon({
|
|
3290
|
-
type:
|
|
3336
|
+
type: type2
|
|
3291
3337
|
})}">
|
|
3292
3338
|
`);
|
|
3293
3339
|
});
|
|
3340
|
+
const handleClick = () => {
|
|
3341
|
+
emit("click", props.position);
|
|
3342
|
+
};
|
|
3294
3343
|
return () => {
|
|
3295
3344
|
return h(GmapAdvancedMarkerView, {
|
|
3296
3345
|
"attrs": {
|
|
@@ -3298,19 +3347,29 @@ const GStartEndPoint = defineSetup(function GStartEndPoint2(props) {
|
|
|
3298
3347
|
"position": vec2lnglat(props.position),
|
|
3299
3348
|
"content": contentRef.value,
|
|
3300
3349
|
"zIndex": ZINDEX_START_END_LOGO_LAYER
|
|
3350
|
+
},
|
|
3351
|
+
"on": {
|
|
3352
|
+
"click": handleClick
|
|
3301
3353
|
}
|
|
3302
3354
|
});
|
|
3303
3355
|
};
|
|
3304
3356
|
});
|
|
3305
|
-
const StartEndPoint = defineSetup(function StartEndPoint2(props
|
|
3357
|
+
const StartEndPoint = defineSetup(function StartEndPoint2(props, {
|
|
3358
|
+
emit
|
|
3359
|
+
}) {
|
|
3306
3360
|
const payload = useMapSupplier();
|
|
3307
3361
|
return () => {
|
|
3308
3362
|
return createElement(payload.supplier === "gmap" ? GStartEndPoint : AStartEndPoint, {
|
|
3309
|
-
attrs: props
|
|
3363
|
+
attrs: props,
|
|
3364
|
+
on: {
|
|
3365
|
+
click: (value) => emit("click", value)
|
|
3366
|
+
}
|
|
3310
3367
|
});
|
|
3311
3368
|
};
|
|
3312
3369
|
});
|
|
3313
|
-
const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props
|
|
3370
|
+
const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props, {
|
|
3371
|
+
emit
|
|
3372
|
+
}) {
|
|
3314
3373
|
const {
|
|
3315
3374
|
registerOverlay,
|
|
3316
3375
|
mapRef,
|
|
@@ -3343,7 +3402,11 @@ const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props)
|
|
|
3343
3402
|
"registerOverlay": registerOverlay,
|
|
3344
3403
|
"position": from,
|
|
3345
3404
|
"title": fromPlace.displayName,
|
|
3346
|
-
"description": fromDescription
|
|
3405
|
+
"description": fromDescription,
|
|
3406
|
+
"withArrow": true
|
|
3407
|
+
},
|
|
3408
|
+
"on": {
|
|
3409
|
+
"click": () => emit("clickStartPoint", fromPlace)
|
|
3347
3410
|
}
|
|
3348
3411
|
}), h(DrivingRoute, {
|
|
3349
3412
|
"attrs": {
|
|
@@ -3366,7 +3429,11 @@ const BusinessQuotingMap = defineLagecySetup(function BusinessQuotingMap2(props)
|
|
|
3366
3429
|
"description": renderDescription({
|
|
3367
3430
|
distance,
|
|
3368
3431
|
duration
|
|
3369
|
-
})
|
|
3432
|
+
}),
|
|
3433
|
+
"withArrow": true
|
|
3434
|
+
},
|
|
3435
|
+
"on": {
|
|
3436
|
+
"click": () => emit("clickEndPoint", toPlace)
|
|
3370
3437
|
}
|
|
3371
3438
|
})]
|
|
3372
3439
|
}
|
|
@@ -3439,6 +3506,10 @@ function compatibaleAddEventListenerDeviceOrientation(handler) {
|
|
|
3439
3506
|
addEventListener("touchend", handleTouchEnd);
|
|
3440
3507
|
return;
|
|
3441
3508
|
}
|
|
3509
|
+
if (typeof DeviceOrientationEvent === "undefined") {
|
|
3510
|
+
console.warn("My Warning: ios not support DeviceOrientationEvent");
|
|
3511
|
+
return;
|
|
3512
|
+
}
|
|
3442
3513
|
DeviceOrientationEvent == null ? void 0 : DeviceOrientationEvent.requestPermission().then((permissionState) => {
|
|
3443
3514
|
if (permissionState === "granted") {
|
|
3444
3515
|
isIOSDeviceOrientationPermissionGranted = true;
|
|
@@ -6087,8 +6158,7 @@ const APlaceCircle = defineSetup(function APlaceCircle2(props, {
|
|
|
6087
6158
|
textAlign: textAlignRef.value
|
|
6088
6159
|
})}" src="${imgPlaceCircle}">`;
|
|
6089
6160
|
});
|
|
6090
|
-
const handleClick = (
|
|
6091
|
-
console.log("AmapMarker click e = ", e);
|
|
6161
|
+
const handleClick = () => {
|
|
6092
6162
|
emit("click", props.position);
|
|
6093
6163
|
};
|
|
6094
6164
|
return () => {
|
|
@@ -5,10 +5,12 @@ export type BusinessQuotingMapProps = Omit<HeycarMapProps, "center" | "zoom"> &
|
|
|
5
5
|
from: Place;
|
|
6
6
|
to: Place;
|
|
7
7
|
fromDescription: string;
|
|
8
|
+
log?: boolean;
|
|
8
9
|
renderDescription: (titleProps: {
|
|
9
10
|
distance: number;
|
|
10
11
|
duration: number;
|
|
11
12
|
}) => string;
|
|
12
|
-
|
|
13
|
+
onClickStartPoint?: (value: Place) => void;
|
|
14
|
+
onClickEndPoint?: (value: Place) => void;
|
|
13
15
|
};
|
|
14
|
-
export declare const BusinessQuotingMap: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<BusinessQuotingMapProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<BusinessQuotingMapProps, Required<BusinessQuotingMapProps>>, "resize" | "dragEnd" | "zoomEnd", BusinessQuotingMapProps, {} | {}>;
|
|
16
|
+
export declare const BusinessQuotingMap: import("vue").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<BusinessQuotingMapProps>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<BusinessQuotingMapProps, Required<BusinessQuotingMapProps>>, "resize" | "dragEnd" | "zoomEnd" | "clickStartPoint" | "clickEndPoint", BusinessQuotingMapProps, {} | {}>;
|
|
@@ -18,3 +18,19 @@ export declare const pointIcon: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
}>;
|
|
21
|
+
export declare const textLayout: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
22
|
+
withArrow: {
|
|
23
|
+
true: {
|
|
24
|
+
paddingRight: "2.67vw";
|
|
25
|
+
};
|
|
26
|
+
false: {};
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
29
|
+
export declare const arrowRight: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
30
|
+
withArrow: {
|
|
31
|
+
true: {};
|
|
32
|
+
false: {
|
|
33
|
+
display: "none";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { GmapOverlay, MapRegisterOverlayProps } from "../../hooks/useOverlay";
|
|
2
|
+
import type { Point } from "../../types/interface";
|
|
2
3
|
export interface StartEndPointProps<T> extends MapRegisterOverlayProps<T> {
|
|
3
4
|
type: "start" | "end";
|
|
4
5
|
position: [number, number];
|
|
5
6
|
title?: string;
|
|
6
7
|
description?: string;
|
|
8
|
+
withArrow?: boolean;
|
|
9
|
+
onClick?: (value: Point) => void;
|
|
7
10
|
}
|
|
8
11
|
export declare const AStartEndPoint: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<StartEndPointProps<{
|
|
9
12
|
_needUpdate: boolean;
|
|
@@ -6869,7 +6872,7 @@ export declare const AStartEndPoint: import("vue-demi").DefineComponent<import("
|
|
|
6869
6872
|
clearEvents(type: AMap.EventType): any;
|
|
6870
6873
|
emit(type: AMap.EventType, data?: any): any;
|
|
6871
6874
|
getEvents(): Record<string, any[]>;
|
|
6872
|
-
}>>>,
|
|
6875
|
+
}>>>, "click", StartEndPointProps<{
|
|
6873
6876
|
_needUpdate: boolean;
|
|
6874
6877
|
readonly CLASS_NAME: "Overlay" | "Overlay.Polygon" | "Overlay.CorePolygon" | "Overlay.CorePolyline" | "Overlay.Rectangle" | "Overlay.Ellipse" | "Overlay.Circle" | "Overlay.CircleMarker" | "Overlay.Polyline" | "Overlay.BezierCurve" | "Overlay.OverlayGroup" | "Overlay.GeoJSON";
|
|
6875
6878
|
className: "Overlay" | "Overlay.Polygon" | "Overlay.CorePolygon" | "Overlay.CorePolyline" | "Overlay.Rectangle" | "Overlay.Ellipse" | "Overlay.Circle" | "Overlay.CircleMarker" | "Overlay.Polyline" | "Overlay.BezierCurve" | "Overlay.OverlayGroup" | "Overlay.GeoJSON";
|
|
@@ -9158,7 +9161,7 @@ export declare const AStartEndPoint: import("vue-demi").DefineComponent<import("
|
|
|
9158
9161
|
emit(type: AMap.EventType, data?: any): any;
|
|
9159
9162
|
getEvents(): Record<string, any[]>;
|
|
9160
9163
|
}>, {}>;
|
|
9161
|
-
export declare const GStartEndPoint: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<StartEndPointProps<GmapOverlay>>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<StartEndPointProps<GmapOverlay>, Required<StartEndPointProps<GmapOverlay>>>,
|
|
9164
|
+
export declare const GStartEndPoint: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<StartEndPointProps<GmapOverlay>>, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").Empty, import("../../types/helper").EmitByProps<StartEndPointProps<GmapOverlay>, Required<StartEndPointProps<GmapOverlay>>>, "click", StartEndPointProps<GmapOverlay>, {}>;
|
|
9162
9165
|
export declare const StartEndPoint: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<StartEndPointProps<{
|
|
9163
9166
|
_needUpdate: boolean;
|
|
9164
9167
|
readonly CLASS_NAME: "Overlay" | "Overlay.Polygon" | "Overlay.CorePolygon" | "Overlay.CorePolyline" | "Overlay.Rectangle" | "Overlay.Ellipse" | "Overlay.Circle" | "Overlay.CircleMarker" | "Overlay.Polyline" | "Overlay.BezierCurve" | "Overlay.OverlayGroup" | "Overlay.GeoJSON";
|
|
@@ -16023,7 +16026,7 @@ export declare const StartEndPoint: import("vue-demi").DefineComponent<import("v
|
|
|
16023
16026
|
clearEvents(type: AMap.EventType): any;
|
|
16024
16027
|
emit(type: AMap.EventType, data?: any): any;
|
|
16025
16028
|
getEvents(): Record<string, any[]>;
|
|
16026
|
-
}> | StartEndPointProps<GmapOverlay>>>,
|
|
16029
|
+
}> | StartEndPointProps<GmapOverlay>>>, "click", StartEndPointProps<{
|
|
16027
16030
|
_needUpdate: boolean;
|
|
16028
16031
|
readonly CLASS_NAME: "Overlay" | "Overlay.Polygon" | "Overlay.CorePolygon" | "Overlay.CorePolyline" | "Overlay.Rectangle" | "Overlay.Ellipse" | "Overlay.Circle" | "Overlay.CircleMarker" | "Overlay.Polyline" | "Overlay.BezierCurve" | "Overlay.OverlayGroup" | "Overlay.GeoJSON";
|
|
16029
16032
|
className: "Overlay" | "Overlay.Polygon" | "Overlay.CorePolygon" | "Overlay.CorePolyline" | "Overlay.Rectangle" | "Overlay.Ellipse" | "Overlay.Circle" | "Overlay.CircleMarker" | "Overlay.Polyline" | "Overlay.BezierCurve" | "Overlay.OverlayGroup" | "Overlay.GeoJSON";
|
package/dist/style.css
CHANGED
|
@@ -152,12 +152,16 @@ a[title*="Google"]>div>img[alt="Google"], .gmnoprint {
|
|
|
152
152
|
align-items: center;
|
|
153
153
|
}
|
|
154
154
|
._4a4ovk1 {
|
|
155
|
+
display: flex;
|
|
156
|
+
align-items: center;
|
|
155
157
|
padding: 1.07vw 2.4vw 1.6vw 2.67vw;
|
|
156
158
|
background: #FFFFFF;
|
|
157
159
|
box-shadow: 0vw 0.53vw 2.4vw 0vw rgba(63,63,63,0.2);
|
|
158
160
|
border-radius: 2.13vw;
|
|
159
161
|
}
|
|
160
162
|
._4a4ovk2 {
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
161
165
|
padding: 2.67vw 2.67vw 2.4vw 3.2vw;
|
|
162
166
|
background: #FFFFFF;
|
|
163
167
|
box-shadow: 0vw 0vw 2.67vw 0vw rgba(78,85,108,0.15);
|
|
@@ -199,6 +203,17 @@ a[title*="Google"]>div>img[alt="Google"], .gmnoprint {
|
|
|
199
203
|
margin-top: 2.4vw;
|
|
200
204
|
width: 6.192vw;
|
|
201
205
|
height: 7.998vw;
|
|
206
|
+
}
|
|
207
|
+
._4a4ovk8 {
|
|
208
|
+
padding-right: 2.67vw;
|
|
209
|
+
}
|
|
210
|
+
._4a4ovka {
|
|
211
|
+
width: 1.758vw;
|
|
212
|
+
height: 2.93vw;
|
|
213
|
+
filter: invert(1);
|
|
214
|
+
}
|
|
215
|
+
._4a4ovkc {
|
|
216
|
+
display: none;
|
|
202
217
|
}._1l6offo0 {
|
|
203
218
|
display: flex;
|
|
204
219
|
}
|