@heycar/heycars-map 0.3.7 → 0.3.9
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/Demo/DemoBusinessRecomendPlace.d.ts +9 -0
- package/dist/business-components/AbsoluteAddressBox/AbsoluteAddressBox.d.ts +1 -2
- package/dist/business-components/AddressBox/AddressBox.d.ts +1 -2
- package/dist/business-components/BusinessQuotingMap/BusinessQuotingMap.d.ts +2 -0
- package/dist/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +2 -2
- package/dist/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.d.ts +1 -2
- package/dist/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +2 -8
- package/dist/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceSection.d.ts +46 -0
- package/dist/business-components/DrivingLine/DrivingLine.d.ts +1 -2
- package/dist/business-components/DrivingRoute/DrivingRoute.d.ts +1 -2
- package/dist/business-components/PassengerCircle/PassengerCircle.d.ts +1 -2
- package/dist/business-components/PickupPoints/PickupPoints.d.ts +1 -2
- package/dist/business-components/PlaceCircle/PlaceCircle.d.ts +1 -2
- package/dist/business-components/StartEndPoint/StartEndPoint.d.ts +1 -2
- package/dist/business-components/TaxiCar/TaxiCar.d.ts +1 -2
- package/dist/business-components/WalkingLine/WalkingLine.d.ts +1 -2
- package/dist/business-components/WalkingRoute/WalkingRoute.d.ts +1 -2
- package/dist/business-components/WaveCircle/WaveCircle.d.ts +1 -2
- package/dist/components/Gmap/Gmap.d.ts +0 -2
- package/dist/components/MapProvider/MapProvider.d.ts +1 -4
- package/dist/hooks/useMapAutoComplete.d.ts +1 -2
- package/dist/hooks-business/useBusinessMapAutoComplete.d.ts +1 -2
- package/dist/index.cjs +54 -54
- package/dist/index.js +1867 -1959
- package/package.json +2 -3
- package/todo.md +27 -4
- package/dist/Demo/CityBound/SearchDemo.d.ts +0 -1
- package/dist/Demo/CityBound/country.d.ts +0 -5
- package/dist/Demo/CityBound/searchResult.d.ts +0 -8
- package/dist/hooks/useMapLog.d.ts +0 -5
- package/src/App.tsx +0 -27
- package/src/Demo/CityBound/SearchDemo.tsx +0 -142
- package/src/Demo/CityBound/country.ts +0 -4179
- package/src/Demo/CityBound/searchResult.ts +0 -21122
- package/src/Demo/Demo.css.ts +0 -6
- package/src/Demo/Demo.tsx +0 -97
- package/src/Demo/DemoBusinessQuoting.tsx +0 -18
- package/src/Demo/DemoBusinessRecomendPlace.tsx +0 -89
- package/src/Demo/DemoBusinessTaxiEnd.tsx +0 -38
- package/src/Demo/DemoBusinessTaxiService.tsx +0 -58
- package/src/Demo/sample.json +0 -793
- package/src/api/contants.ts +0 -3
- package/src/api/driving.ts +0 -87
- package/src/api/geocoder.ts +0 -88
- package/src/api/geometry.ts +0 -44
- package/src/api/place.ts +0 -105
- package/src/assets/icons/svg/address-locator.svg +0 -1
- package/src/assets/icons/svg/arrow-right.svg +0 -1
- package/src/assets/icons/svg/end-point.svg +0 -1
- package/src/assets/icons/svg/passenger-circle.svg +0 -1
- package/src/assets/icons/svg/place-circle.svg +0 -22
- package/src/assets/icons/svg/start-point.svg +0 -1
- package/src/assets/icons/svg/taxi-car.svg +0 -1
- package/src/assets/icons/svg/wave-circle.svg +0 -1
- package/src/business-components/AbsoluteAddressBox/AbsoluteAddressBox.css.ts +0 -68
- package/src/business-components/AbsoluteAddressBox/AbsoluteAddressBox.tsx +0 -50
- package/src/business-components/AbsoluteAddressBox/index.ts +0 -1
- package/src/business-components/AddressBox/AddressBox.css.ts +0 -55
- package/src/business-components/AddressBox/AddressBox.tsx +0 -76
- package/src/business-components/AddressBox/index.ts +0 -1
- package/src/business-components/AddressLocator/AddressLocator.css.ts +0 -7
- package/src/business-components/AddressLocator/AddressLocator.tsx +0 -40
- package/src/business-components/AddressLocator/index.ts +0 -1
- package/src/business-components/BusinessQuotingMap/BusinessQuotingMap.tsx +0 -49
- package/src/business-components/BusinessQuotingMap/index.ts +0 -1
- package/src/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.tsx +0 -218
- package/src/business-components/BusinessRecomendPlaceMap/index.ts +0 -1
- package/src/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.tsx +0 -43
- package/src/business-components/BusinessTaxiEndMap/index.ts +0 -1
- package/src/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.tsx +0 -453
- package/src/business-components/BusinessTaxiServiceMap/index.ts +0 -1
- package/src/business-components/DrivingLine/DrivingLine.css.ts +0 -10
- package/src/business-components/DrivingLine/DrivingLine.tsx +0 -135
- package/src/business-components/DrivingLine/index.ts +0 -1
- package/src/business-components/DrivingRoute/DrivingRoute.tsx +0 -52
- package/src/business-components/DrivingRoute/index.ts +0 -1
- package/src/business-components/FitView/FitView.tsx +0 -22
- package/src/business-components/FitView/index.ts +0 -1
- package/src/business-components/PassengerCircle/PassengerCircle.css.ts +0 -21
- package/src/business-components/PassengerCircle/PassengerCircle.tsx +0 -69
- package/src/business-components/PassengerCircle/index.ts +0 -1
- package/src/business-components/PickupPoints/PickupPoints.tsx +0 -38
- package/src/business-components/PickupPoints/index.ts +0 -1
- package/src/business-components/PlaceCircle/PlaceCircle.css.ts +0 -76
- package/src/business-components/PlaceCircle/PlaceCircle.tsx +0 -110
- package/src/business-components/PlaceCircle/index.ts +0 -1
- package/src/business-components/StartEndPoint/StartEndPoint.css.ts +0 -70
- package/src/business-components/StartEndPoint/StartEndPoint.tsx +0 -122
- package/src/business-components/StartEndPoint/index.ts +0 -1
- package/src/business-components/TaxiCar/TaxiCar.css.ts +0 -16
- package/src/business-components/TaxiCar/TaxiCar.tsx +0 -93
- package/src/business-components/TaxiCar/index.ts +0 -1
- package/src/business-components/WalkingLine/WalkingLine.tsx +0 -80
- package/src/business-components/WalkingLine/index.ts +0 -1
- package/src/business-components/WalkingRoute/WalkingRoute.tsx +0 -43
- package/src/business-components/WalkingRoute/index.ts +0 -1
- package/src/business-components/WaveCircle/WaveCircle.css.ts +0 -54
- package/src/business-components/WaveCircle/WaveCircle.tsx +0 -59
- package/src/business-components/WaveCircle/index.ts +0 -1
- package/src/components/Amap/Amap.css.ts +0 -5
- package/src/components/Amap/Amap.ts +0 -76
- package/src/components/Amap/index.ts +0 -1
- package/src/components/AmapInfoWindow/AmapInfoWindow.ts +0 -45
- package/src/components/AmapInfoWindow/index.ts +0 -1
- package/src/components/AmapLoader/AmapLoader.ts +0 -20
- package/src/components/AmapLoader/index.ts +0 -1
- package/src/components/AmapMarker/AmapMarker.ts +0 -48
- package/src/components/AmapMarker/index.ts +0 -1
- package/src/components/AmapPolygon/AmapPolygon.ts +0 -41
- package/src/components/AmapPolygon/index.ts +0 -1
- package/src/components/AmapPolyline/AmapPolyline.ts +0 -40
- package/src/components/AmapPolyline/index.ts +0 -1
- package/src/components/AmapText/AmapText.ts +0 -39
- package/src/components/AmapText/index.ts +0 -1
- package/src/components/Gmap/Gmap.css.ts +0 -10
- package/src/components/Gmap/Gmap.ts +0 -54
- package/src/components/Gmap/index.ts +0 -1
- package/src/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.ts +0 -63
- package/src/components/GmapAdvancedMarkerView/index.ts +0 -1
- package/src/components/GmapInfoWindow/GmapInfoWindow.ts +0 -38
- package/src/components/GmapInfoWindow/index.ts +0 -1
- package/src/components/GmapLoader/GmapLoader.ts +0 -21
- package/src/components/GmapLoader/index.ts +0 -1
- package/src/components/GmapMarker/GmapMarker.ts +0 -34
- package/src/components/GmapMarker/index.ts +0 -1
- package/src/components/GmapPolygon/GmapPolygon.ts +0 -29
- package/src/components/GmapPolygon/index.ts +0 -1
- package/src/components/GmapPolyline/GmapPolyline.ts +0 -29
- package/src/components/GmapPolyline/index.ts +0 -1
- package/src/components/MapProvider/MapProvider.tsx +0 -83
- package/src/components/MapProvider/index.ts +0 -1
- package/src/hooks/useDrivingRoute.ts +0 -106
- package/src/hooks/useGeoLocation.ts +0 -70
- package/src/hooks/useHeycarMap.ts +0 -28
- package/src/hooks/useMap.ts +0 -43
- package/src/hooks/useMapAngle.ts +0 -42
- package/src/hooks/useMapAutoComplete.ts +0 -130
- package/src/hooks/useMapCityBound.ts +0 -64
- package/src/hooks/useMapDrag.ts +0 -72
- package/src/hooks/useMapEventSource.ts +0 -20
- package/src/hooks/useMapFitView.ts +0 -135
- package/src/hooks/useMapGeometry.ts +0 -27
- package/src/hooks/useMapLngLatToVw.ts +0 -31
- package/src/hooks/useMapLoader.ts +0 -164
- package/src/hooks/useMapLog.ts +0 -24
- package/src/hooks/useMapPlace.ts +0 -138
- package/src/hooks/useMapRecomendPlace.ts +0 -150
- package/src/hooks/useMapSupplier.ts +0 -16
- package/src/hooks/useOverlay.ts +0 -23
- package/src/hooks/usePlacesLabelDirection.ts +0 -61
- package/src/hooks/useUdate.ts +0 -9
- package/src/hooks/useWaitTimer.ts +0 -25
- package/src/hooks/useWalkingRoute.ts +0 -87
- package/src/hooks-business/useBusinessMapAutoComplete.ts +0 -22
- package/src/hooks-business/useBusinessQuotingMap.ts +0 -11
- package/src/hooks-business/useBusinessRecomendPlaceMap.ts +0 -45
- package/src/hooks-business/useBusinessTaxiServiceMap.ts +0 -12
- package/src/index.ts +0 -33
- package/src/main.ts +0 -6
- package/src/style.css +0 -0
- package/src/types/amap/autocomplete.d.ts +0 -64
- package/src/types/amap/driving.d.ts +0 -170
- package/src/types/amap/geocoder.d.ts +0 -217
- package/src/types/amap/marker.ts +0 -11
- package/src/types/amap/place.d.ts +0 -114
- package/src/types/amap/plugin.d.ts +0 -27
- package/src/types/amap/walking.d.ts +0 -78
- package/src/types/global.d.ts +0 -10
- package/src/types/helper.ts +0 -172
- package/src/types/interface.ts +0 -62
- package/src/types/mapHelper.ts +0 -1
- package/src/utils/compare.ts +0 -189
- package/src/utils/dom.ts +0 -14
- package/src/utils/helper.ts +0 -5
- package/src/utils/transform.ts +0 -68
- package/src/vite-env.d.ts +0 -12
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heycar/heycars-map",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite -c vite.config.dev.ts",
|
|
7
|
-
"dev:lib": "concurrently \"vite build --watch --emptyOutDir false\" \"tsc --declarationDir dist --emitDeclarationOnly --noEmit false --declaration --watch\"",
|
|
8
7
|
"build": "rm -rf dist && vite build && tsc --declarationDir dist --emitDeclarationOnly --noEmit false --declaration",
|
|
9
|
-
"
|
|
8
|
+
"publish": "npm publish --access public --registry https://registry.npmjs.com"
|
|
10
9
|
},
|
|
11
10
|
"types": "./dist/index.d.ts",
|
|
12
11
|
"module": "./dist/index.js",
|
package/todo.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
https://dawchihliou.github.io/articles/building-custom-google-maps-marker-react-component-like-airbnb-in-nextjs
|
|
2
2
|
|
|
3
3
|
2. Google 地址名称太长
|
|
4
|
-
3.
|
|
5
|
-
4.
|
|
4
|
+
3. 中心点 drag 期间位置
|
|
5
|
+
4. 高德地图加载期间出现大量的请求
|
|
6
|
+
5. google/高德 坐标系转化
|
|
6
7
|
|
|
7
8
|
---
|
|
8
9
|
|
|
@@ -12,9 +13,31 @@ https://dawchihliou.github.io/articles/building-custom-google-maps-marker-react-
|
|
|
12
13
|
|
|
13
14
|
---
|
|
14
15
|
|
|
16
|
+
1. locator 的气泡也要支持点击
|
|
17
|
+
2. locator 气泡长度限制
|
|
15
18
|
3. locator 拖动次数多了会不更新
|
|
19
|
+
4. 郝瑞 searh Place 接口搜索次数多了会不更新
|
|
16
20
|
|
|
17
21
|
---
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
1. 定位失败的视觉稿文字提示
|
|
24
|
+
2. 用户手动输入地址,然后跳回 home 页面, centerplace 的 name 不正确
|
|
25
|
+
3. 用户地址搜索,先设置台湾,搜个结果,然后切换城市到新加坡,搜索到结果依然是台湾
|
|
26
|
+
|
|
27
|
+
谭红娅
|
|
28
|
+
|
|
29
|
+
- 4789
|
|
30
|
+
|
|
31
|
+
v0.3.8
|
|
32
|
+
|
|
33
|
+
- 4845
|
|
34
|
+
- 4898
|
|
35
|
+
- 4840
|
|
36
|
+
- 4827
|
|
37
|
+
- 4808
|
|
38
|
+
|
|
39
|
+
v0.3.9
|
|
40
|
+
|
|
41
|
+
- 4809
|
|
42
|
+
- 4604
|
|
43
|
+
- 4789
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SearchDemo: import("vue-demi").DefineComponent<import("vue/types/v3-component-props").ComponentObjectPropsOptions<unknown>, 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<unknown, Required<unknown>>, never, unknown, {}>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export interface MapLogProps {
|
|
2
|
-
log?: boolean;
|
|
3
|
-
}
|
|
4
|
-
export declare const useMapLog: <P extends MapLogProps>(props: P, prefix: string) => void;
|
|
5
|
-
export declare const useMapLogVariable: <P extends MapLogProps>(props: P, prefix: string, variable: any, name: string) => void;
|
package/src/App.tsx
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { defineComponent } from "vue-demi";
|
|
2
|
-
import { MapProvider } from "./components/MapProvider";
|
|
3
|
-
import { DemoBusinessRecomendPlace } from "./Demo/DemoBusinessRecomendPlace";
|
|
4
|
-
|
|
5
|
-
const gmapApiKey = import.meta.env.VITE_GMAP_API_KEY;
|
|
6
|
-
const gmapId = import.meta.env.VITE_GMAP_MAP_ID;
|
|
7
|
-
const amapApiKey = import.meta.env.VITE_AMAP_API_KEY;
|
|
8
|
-
const amapApiSecret = import.meta.env.VITE_AMAP_API_SECRET;
|
|
9
|
-
|
|
10
|
-
export const App = defineComponent({
|
|
11
|
-
setup() {
|
|
12
|
-
return () => (
|
|
13
|
-
<MapProvider
|
|
14
|
-
amapKey={amapApiKey}
|
|
15
|
-
amapSecret={amapApiSecret}
|
|
16
|
-
gmapId={gmapId}
|
|
17
|
-
gmapKey={gmapApiKey}
|
|
18
|
-
supplier={"gmap"}
|
|
19
|
-
>
|
|
20
|
-
<DemoBusinessRecomendPlace />
|
|
21
|
-
{/* <DemoBusinessQuoting /> */}
|
|
22
|
-
{/* <DemoBusinessTaxiService /> */}
|
|
23
|
-
{/* <DemoBusinessTaxiEnd /> */}
|
|
24
|
-
</MapProvider>
|
|
25
|
-
);
|
|
26
|
-
},
|
|
27
|
-
});
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { watchPostEffect } from "vue-demi";
|
|
2
|
-
import { HeycarMap, MapProvider } from "../../components/MapProvider/MapProvider";
|
|
3
|
-
import { useHeycarMap } from "../../hooks/useHeycarMap";
|
|
4
|
-
import { defineSetup } from "../../types/helper";
|
|
5
|
-
import * as css from "../Demo.css";
|
|
6
|
-
import { citiesWithCountry } from "./country";
|
|
7
|
-
import { searchResult } from "./searchResult";
|
|
8
|
-
|
|
9
|
-
const gmapApiKey = import.meta.env.VITE_GMAP_API_KEY;
|
|
10
|
-
const gmapId = import.meta.env.VITE_GMAP_MAP_ID;
|
|
11
|
-
const amapApiKey = import.meta.env.VITE_AMAP_API_KEY;
|
|
12
|
-
const amapApiSecret = import.meta.env.VITE_AMAP_API_SECRET;
|
|
13
|
-
|
|
14
|
-
export const SearchDemo = defineSetup(function HeycarDemo() {
|
|
15
|
-
return () => (
|
|
16
|
-
<MapProvider
|
|
17
|
-
amapKey={amapApiKey}
|
|
18
|
-
amapSecret={amapApiSecret}
|
|
19
|
-
gmapId={gmapId}
|
|
20
|
-
gmapKey={gmapApiKey}
|
|
21
|
-
supplier={"gmap"}
|
|
22
|
-
>
|
|
23
|
-
<SomePage />
|
|
24
|
-
</MapProvider>
|
|
25
|
-
);
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const SomePage = defineSetup(function Hello() {
|
|
29
|
-
const { mapRef, setMap, panTo } = useHeycarMap();
|
|
30
|
-
(window as any).panTo = panTo;
|
|
31
|
-
watchPostEffect(() => {
|
|
32
|
-
const map = mapRef.value as google.maps.Map;
|
|
33
|
-
if (!map) return;
|
|
34
|
-
const searchName = async (idx: number, address: string, country: string) => {
|
|
35
|
-
const geocoder = new google.maps.Geocoder();
|
|
36
|
-
// const placeService = new google.maps.places.PlacesService(document.createElement("div"));
|
|
37
|
-
return new Promise((resolve, reject) => {
|
|
38
|
-
geocoder.geocode(
|
|
39
|
-
{
|
|
40
|
-
address,
|
|
41
|
-
componentRestrictions: {
|
|
42
|
-
country,
|
|
43
|
-
administrativeArea: "administrative_area_level_1",
|
|
44
|
-
},
|
|
45
|
-
language: "en",
|
|
46
|
-
},
|
|
47
|
-
(results, status) => {
|
|
48
|
-
switch (status) {
|
|
49
|
-
case google.maps.GeocoderStatus.OK: {
|
|
50
|
-
if (results?.length === 2) {
|
|
51
|
-
const [result1, result2] = results;
|
|
52
|
-
const isResult1Admin = result1.types[0].startsWith("administrative_area_level_");
|
|
53
|
-
const isResult2Admin = result2.types[0].startsWith("administrative_area_level_");
|
|
54
|
-
if (isResult1Admin && !isResult2Admin) {
|
|
55
|
-
return resolve(result1.geometry.bounds?.toJSON());
|
|
56
|
-
}
|
|
57
|
-
if (isResult2Admin && !isResult1Admin) {
|
|
58
|
-
return resolve(result2.geometry.bounds?.toJSON());
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
if (results?.length !== 1) {
|
|
62
|
-
console.warn("length !== 1 by idx, keyword, results = ", idx, address, results);
|
|
63
|
-
return resolve(undefined);
|
|
64
|
-
}
|
|
65
|
-
const { geometry } = results[0];
|
|
66
|
-
const output = geometry.bounds?.toJSON() ?? geometry.viewport.toJSON();
|
|
67
|
-
return resolve(output);
|
|
68
|
-
}
|
|
69
|
-
case google.maps.GeocoderStatus.ZERO_RESULTS: {
|
|
70
|
-
return resolve(undefined);
|
|
71
|
-
}
|
|
72
|
-
default:
|
|
73
|
-
throw reject(status);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
const wait = (seconds: number) => new Promise((r) => setTimeout(r, seconds * 1000));
|
|
80
|
-
const search = async (from: number, to: number) => {
|
|
81
|
-
const citiesSample = citiesWithCountry.slice(from, to);
|
|
82
|
-
const result: { name: string; country: string; bound: any }[] = [];
|
|
83
|
-
let idx = from;
|
|
84
|
-
try {
|
|
85
|
-
for (const city of citiesSample) {
|
|
86
|
-
if (idx % 10 === 0) {
|
|
87
|
-
console.log("start processing idx = ", idx);
|
|
88
|
-
}
|
|
89
|
-
const bound = await searchName(idx, city.name, city.country);
|
|
90
|
-
await wait(2);
|
|
91
|
-
result.push({ name: city.name, country: city.country, bound: bound ?? null });
|
|
92
|
-
idx += 1;
|
|
93
|
-
}
|
|
94
|
-
console.log("success search result = ");
|
|
95
|
-
console.log(JSON.stringify(result));
|
|
96
|
-
} catch (e) {
|
|
97
|
-
console.log("failed search break idx = ", idx);
|
|
98
|
-
console.log(JSON.stringify(result));
|
|
99
|
-
throw e;
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
const searchRest = async () => {
|
|
104
|
-
const notfound = searchResult.filter((item) => item.bound == null);
|
|
105
|
-
const result: { name: string; country: string; bound: any }[] = [];
|
|
106
|
-
try {
|
|
107
|
-
for (const city of notfound) {
|
|
108
|
-
try {
|
|
109
|
-
const bound = await searchName(0, city.name, city.country);
|
|
110
|
-
await wait(2);
|
|
111
|
-
result.push({ name: city.name, country: city.country, bound: bound ?? null });
|
|
112
|
-
} catch (e) {
|
|
113
|
-
console.warn("fail search name, country = ", city.name, city.country);
|
|
114
|
-
console.error(e);
|
|
115
|
-
continue;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
console.log("success search result = ");
|
|
119
|
-
console.log(JSON.stringify(result));
|
|
120
|
-
} catch (e) {
|
|
121
|
-
console.log(JSON.stringify(result));
|
|
122
|
-
throw e;
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
(window as any).search = search;
|
|
126
|
-
(window as any).searchRest = searchRest;
|
|
127
|
-
});
|
|
128
|
-
return () => {
|
|
129
|
-
return (
|
|
130
|
-
<div>
|
|
131
|
-
<HeycarMap
|
|
132
|
-
class={css.demo}
|
|
133
|
-
fallback={() => <div>error</div>}
|
|
134
|
-
loading={() => <div>loading</div>}
|
|
135
|
-
center={[121, 31]}
|
|
136
|
-
zoom={15}
|
|
137
|
-
mapRef={setMap}
|
|
138
|
-
></HeycarMap>
|
|
139
|
-
</div>
|
|
140
|
-
);
|
|
141
|
-
};
|
|
142
|
-
});
|