@heycar/heycars-map 0.3.0 → 0.3.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.
@@ -7,6 +7,7 @@ export type Place = {
7
7
  lat: number;
8
8
  name: string;
9
9
  cityName?: string;
10
+ cityParentName?: string;
10
11
  countryName?: string;
11
12
  };
12
13
  export interface AutoCompletePlace extends Place {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heycar/heycars-map",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite -c vite.config.dev.ts",
@@ -11,6 +11,7 @@ import * as css from "./Demo.css";
11
11
  const SomeAutoComplete = defineSetup(function SomeAutoComplete(props: { cityName: string }) {
12
12
  const { autoCompletePlaces, handleKeywordInput, setCity } = useBusinessMapAutoComplete({
13
13
  cityNameRef: computed(() => props.cityName),
14
+ log: true,
14
15
  });
15
16
  (window as any).setCity = setCity;
16
17
  return () => {
@@ -57,14 +58,14 @@ export const DemoBusinessRecomendPlace = defineSetup(function DemoBusinessRecome
57
58
  <div>
58
59
  placeCandidates: {placeCandidates} <br />
59
60
  centerPlace: {centerPlace.lng} | {centerPlace.lat} | {centerPlace.name} |{" "}
60
- {centerPlace.cityName} | {centerPlace.countryName} <br />
61
- <SomeAutoComplete cityName="Taiwan"></SomeAutoComplete>
61
+ {centerPlace.cityName} | {centerPlace.cityParentName} | {centerPlace.countryName} <br />
62
+ <SomeAutoComplete cityName="Shinjuku-ku"></SomeAutoComplete>
62
63
  <BusinessRecomendPlaceMap
63
64
  class={css.demo}
64
65
  unavailableTitle={"当前区域暂未开通服务"}
65
66
  noRecomendDescription={"附近无推荐上车地点"}
66
67
  recomendDescription={"最佳上车地点"}
67
- geoDefaultPosition={[103.771994, 1.296648]}
68
+ geoDefaultPosition={[139.728287, 35.661007]}
68
69
  getRecomendPlace={getRecomendPlace}
69
70
  mapContext={mapContext}
70
71
  onGeoError={(e) => console.log("onGeoError e = ", e)}