@heycar/heycars-map 0.1.0

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.
Files changed (191) hide show
  1. package/.eslintrc.json +15 -0
  2. package/README.md +18 -0
  3. package/dist/App.d.ts +1 -0
  4. package/dist/api/driving.d.ts +12 -0
  5. package/dist/api/geocoder.d.ts +16 -0
  6. package/dist/api/geometry.d.ts +20 -0
  7. package/dist/api/place.d.ts +16 -0
  8. package/dist/business-components/AddressBox/AddressBox.css.d.ts +7 -0
  9. package/dist/business-components/AddressBox/AddressBox.d.ts +10 -0
  10. package/dist/business-components/AddressBox/index.d.ts +1 -0
  11. package/dist/business-components/AddressLocator/AddressLocator.css.d.ts +1 -0
  12. package/dist/business-components/AddressLocator/AddressLocator.d.ts +7 -0
  13. package/dist/business-components/AddressLocator/index.d.ts +1 -0
  14. package/dist/business-components/DrivingLine/DrivingLine.css.d.ts +1 -0
  15. package/dist/business-components/DrivingLine/DrivingLine.d.ts +6 -0
  16. package/dist/business-components/DrivingLine/index.d.ts +1 -0
  17. package/dist/business-components/PassengerCircle/PassengerCircle.css.d.ts +1 -0
  18. package/dist/business-components/PassengerCircle/PassengerCircle.d.ts +7 -0
  19. package/dist/business-components/PassengerCircle/index.d.ts +1 -0
  20. package/dist/business-components/PlaceCircle/PlaceCircle.css.d.ts +5 -0
  21. package/dist/business-components/PlaceCircle/PlaceCircle.d.ts +8 -0
  22. package/dist/business-components/PlaceCircle/index.d.ts +1 -0
  23. package/dist/business-components/StartEndPoint/StartEndPoint.css.d.ts +20 -0
  24. package/dist/business-components/StartEndPoint/StartEndPoint.d.ts +9 -0
  25. package/dist/business-components/StartEndPoint/index.d.ts +1 -0
  26. package/dist/business-components/TaxiCar/TaxiCar.css.d.ts +3 -0
  27. package/dist/business-components/TaxiCar/TaxiCar.d.ts +8 -0
  28. package/dist/business-components/TaxiCar/index.d.ts +1 -0
  29. package/dist/business-components/WalkingLine/WalkingLine.d.ts +6 -0
  30. package/dist/business-components/WalkingLine/index.d.ts +1 -0
  31. package/dist/business-components/WaveCircle/WaveCircle.css.d.ts +4 -0
  32. package/dist/business-components/WaveCircle/WaveCircle.d.ts +6 -0
  33. package/dist/business-components/WaveCircle/index.d.ts +1 -0
  34. package/dist/components/Amap/Amap.css.d.ts +1 -0
  35. package/dist/components/Amap/Amap.d.ts +7 -0
  36. package/dist/components/Amap/index.d.ts +1 -0
  37. package/dist/components/Amap/useAmap.d.ts +399 -0
  38. package/dist/components/AmapInfoWindow/AmapInfoWindow.d.ts +4 -0
  39. package/dist/components/AmapInfoWindow/index.d.ts +1 -0
  40. package/dist/components/AmapLoader/AmapLoader.d.ts +20 -0
  41. package/dist/components/AmapLoader/index.d.ts +1 -0
  42. package/dist/components/AmapMarker/AmapMarker.d.ts +2 -0
  43. package/dist/components/AmapMarker/index.d.ts +1 -0
  44. package/dist/components/AmapPolygon/AmapPolygon.d.ts +2 -0
  45. package/dist/components/AmapPolygon/index.d.ts +1 -0
  46. package/dist/components/AmapPolyline/AmapPolyline.d.ts +2 -0
  47. package/dist/components/AmapPolyline/index.d.ts +1 -0
  48. package/dist/components/AmapText/AmapText.d.ts +2 -0
  49. package/dist/components/AmapText/index.d.ts +1 -0
  50. package/dist/components/Demo/BusinessDemo.d.ts +2 -0
  51. package/dist/components/Demo/Demo.css.d.ts +1 -0
  52. package/dist/components/Demo/Demo.d.ts +2 -0
  53. package/dist/components/Demo/Hello.d.ts +17 -0
  54. package/dist/components/Demo/HeycarDemo.d.ts +1 -0
  55. package/dist/components/Demo/index.d.ts +1 -0
  56. package/dist/components/Gmap/Gmap.d.ts +5 -0
  57. package/dist/components/Gmap/index.d.ts +1 -0
  58. package/dist/components/Gmap/useGmap.d.ts +5 -0
  59. package/dist/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.d.ts +3 -0
  60. package/dist/components/GmapAdvancedMarkerView/index.d.ts +1 -0
  61. package/dist/components/GmapInfoWindow/GmapInfoWindow.d.ts +5 -0
  62. package/dist/components/GmapInfoWindow/index.d.ts +1 -0
  63. package/dist/components/GmapLoader/GmapLoader.d.ts +37 -0
  64. package/dist/components/GmapLoader/index.d.ts +1 -0
  65. package/dist/components/GmapMarker/GmapMarker.d.ts +3 -0
  66. package/dist/components/GmapMarker/index.d.ts +1 -0
  67. package/dist/components/GmapPolygon/GmapPolygon.d.ts +3 -0
  68. package/dist/components/GmapPolygon/index.d.ts +1 -0
  69. package/dist/components/GmapPolyline/GmapPolyline.d.ts +3 -0
  70. package/dist/components/GmapPolyline/index.d.ts +1 -0
  71. package/dist/components/MapProvider/MapProvider.d.ts +7 -0
  72. package/dist/components/MapProvider/index.d.ts +1 -0
  73. package/dist/components/MapProvider/useMapSupplier.d.ts +11 -0
  74. package/dist/index.cjs +70 -0
  75. package/dist/index.d.ts +14 -0
  76. package/dist/index.js +1498 -0
  77. package/dist/main.d.ts +1 -0
  78. package/dist/style.css +1 -0
  79. package/dist/types/amap/marker.d.ts +11 -0
  80. package/dist/types/helper.d.ts +30 -0
  81. package/dist/types/interface.d.ts +1 -0
  82. package/dist/utils/compare.d.ts +21 -0
  83. package/dist/utils/dom.d.ts +2 -0
  84. package/dist/utils/transform.d.ts +9 -0
  85. package/dist/vite.svg +1 -0
  86. package/esbuild.mjs +40 -0
  87. package/index.html +13 -0
  88. package/package.json +94 -0
  89. package/public/vite.svg +1 -0
  90. package/src/App.tsx +10 -0
  91. package/src/api/driving.ts +87 -0
  92. package/src/api/geocoder.ts +88 -0
  93. package/src/api/geometry.ts +44 -0
  94. package/src/api/place.ts +107 -0
  95. package/src/assets/icons/svg/address-locator.svg +1 -0
  96. package/src/assets/icons/svg/arrow-right.svg +1 -0
  97. package/src/assets/icons/svg/end-point.svg +1 -0
  98. package/src/assets/icons/svg/passenger-circle.svg +1 -0
  99. package/src/assets/icons/svg/place-circle.svg +22 -0
  100. package/src/assets/icons/svg/start-point.svg +1 -0
  101. package/src/assets/icons/svg/taxi-car.svg +1 -0
  102. package/src/assets/icons/svg/wave-circle.svg +1 -0
  103. package/src/business-components/AddressBox/AddressBox.css.ts +55 -0
  104. package/src/business-components/AddressBox/AddressBox.tsx +69 -0
  105. package/src/business-components/AddressBox/index.ts +1 -0
  106. package/src/business-components/AddressLocator/AddressLocator.css.ts +7 -0
  107. package/src/business-components/AddressLocator/AddressLocator.tsx +40 -0
  108. package/src/business-components/AddressLocator/index.ts +1 -0
  109. package/src/business-components/DrivingLine/DrivingLine.css.ts +10 -0
  110. package/src/business-components/DrivingLine/DrivingLine.tsx +124 -0
  111. package/src/business-components/DrivingLine/index.ts +1 -0
  112. package/src/business-components/PassengerCircle/PassengerCircle.css.ts +8 -0
  113. package/src/business-components/PassengerCircle/PassengerCircle.tsx +42 -0
  114. package/src/business-components/PassengerCircle/index.ts +1 -0
  115. package/src/business-components/PlaceCircle/PlaceCircle.css.ts +30 -0
  116. package/src/business-components/PlaceCircle/PlaceCircle.tsx +66 -0
  117. package/src/business-components/PlaceCircle/index.ts +1 -0
  118. package/src/business-components/StartEndPoint/StartEndPoint.css.ts +70 -0
  119. package/src/business-components/StartEndPoint/StartEndPoint.tsx +103 -0
  120. package/src/business-components/StartEndPoint/index.ts +1 -0
  121. package/src/business-components/TaxiCar/TaxiCar.css.ts +16 -0
  122. package/src/business-components/TaxiCar/TaxiCar.tsx +77 -0
  123. package/src/business-components/TaxiCar/index.ts +1 -0
  124. package/src/business-components/WalkingLine/WalkingLine.tsx +73 -0
  125. package/src/business-components/WalkingLine/index.ts +1 -0
  126. package/src/business-components/WaveCircle/WaveCircle.css.ts +54 -0
  127. package/src/business-components/WaveCircle/WaveCircle.tsx +56 -0
  128. package/src/business-components/WaveCircle/index.ts +1 -0
  129. package/src/components/Amap/Amap.css.ts +3 -0
  130. package/src/components/Amap/Amap.ts +58 -0
  131. package/src/components/Amap/index.ts +1 -0
  132. package/src/components/Amap/useAmap.ts +9 -0
  133. package/src/components/AmapInfoWindow/AmapInfoWindow.ts +45 -0
  134. package/src/components/AmapInfoWindow/index.ts +1 -0
  135. package/src/components/AmapLoader/AmapLoader.ts +68 -0
  136. package/src/components/AmapLoader/index.ts +1 -0
  137. package/src/components/AmapMarker/AmapMarker.ts +38 -0
  138. package/src/components/AmapMarker/index.ts +1 -0
  139. package/src/components/AmapPolygon/AmapPolygon.ts +41 -0
  140. package/src/components/AmapPolygon/index.ts +1 -0
  141. package/src/components/AmapPolyline/AmapPolyline.ts +40 -0
  142. package/src/components/AmapPolyline/index.ts +1 -0
  143. package/src/components/AmapText/AmapText.ts +39 -0
  144. package/src/components/AmapText/index.ts +1 -0
  145. package/src/components/Demo/BusinessDemo.tsx +117 -0
  146. package/src/components/Demo/Demo.css.ts +6 -0
  147. package/src/components/Demo/Demo.tsx +97 -0
  148. package/src/components/Demo/Hello.tsx +15 -0
  149. package/src/components/Demo/HeycarDemo.tsx +31 -0
  150. package/src/components/Demo/TemplateDemo.vue +11 -0
  151. package/src/components/Demo/index.ts +1 -0
  152. package/src/components/Gmap/Gmap.ts +34 -0
  153. package/src/components/Gmap/index.ts +1 -0
  154. package/src/components/Gmap/useGmap.ts +7 -0
  155. package/src/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.ts +48 -0
  156. package/src/components/GmapAdvancedMarkerView/index.ts +1 -0
  157. package/src/components/GmapInfoWindow/GmapInfoWindow.ts +38 -0
  158. package/src/components/GmapInfoWindow/index.ts +1 -0
  159. package/src/components/GmapLoader/GmapLoader.ts +79 -0
  160. package/src/components/GmapLoader/index.ts +1 -0
  161. package/src/components/GmapMarker/GmapMarker.ts +31 -0
  162. package/src/components/GmapMarker/index.ts +1 -0
  163. package/src/components/GmapPolygon/GmapPolygon.ts +29 -0
  164. package/src/components/GmapPolygon/index.ts +1 -0
  165. package/src/components/GmapPolyline/GmapPolyline.ts +29 -0
  166. package/src/components/GmapPolyline/index.ts +1 -0
  167. package/src/components/MapProvider/MapProvider.tsx +64 -0
  168. package/src/components/MapProvider/index.ts +1 -0
  169. package/src/components/MapProvider/useMapSupplier.ts +19 -0
  170. package/src/index.ts +14 -0
  171. package/src/main.ts +6 -0
  172. package/src/style.css +0 -0
  173. package/src/types/amap/autocomplete.d.ts +64 -0
  174. package/src/types/amap/driving.d.ts +168 -0
  175. package/src/types/amap/geocoder.d.ts +214 -0
  176. package/src/types/amap/marker.ts +11 -0
  177. package/src/types/amap/place.d.ts +114 -0
  178. package/src/types/amap/plugin.d.ts +27 -0
  179. package/src/types/amap/walking.d.ts +76 -0
  180. package/src/types/global.d.ts +10 -0
  181. package/src/types/helper.ts +139 -0
  182. package/src/types/interface.ts +1 -0
  183. package/src/utils/compare.ts +174 -0
  184. package/src/utils/dom.ts +14 -0
  185. package/src/utils/transform.ts +27 -0
  186. package/src/vite-env.d.ts +12 -0
  187. package/todo.md +1 -0
  188. package/tsconfig.json +25 -0
  189. package/tsconfig.node.json +9 -0
  190. package/vite.config.dev.ts +17 -0
  191. package/vite.config.ts +40 -0
package/dist/main.d.ts ADDED
@@ -0,0 +1 @@
1
+ import "./style.css";
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ ._130jqet0{display:flex;flex-direction:column;align-items:center;margin-bottom:-1.6vw}._130jqet1{padding:2.13vw 4.5vw 2.67vw 4.27vw;display:flex;align-items:center;background:linear-gradient(90deg,#79AFFF 0%,#5C8DFF 32%,#507FFF 75%,#4471FF 100%);border-radius:3.2vw}._130jqet2{font-size:3.47vw;font-family:PingFangSC-Semibold,PingFang SC;font-weight:600;color:#fff;line-height:4.8vw;white-space:nowrap}._130jqet3{font-size:2.93vw;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#eafaf8;line-height:4.27vw;white-space:nowrap;opacity:.8}._130jqet4{margin-left:3.2vw;width:1.44vw;height:2.4vw}._130jqet5{width:.8vw;height:4vw;background:#4C80FF;border-radius:0vw 0vw 26.67vw 26.67vw;z-index:1}._130jqet6{margin-top:-1.5vw;width:3.2vw;height:3.2vw}.tdbf070{width:7.1045vw;height:10.93vw;display:flex}._18fnvd20{display:flex;margin-bottom:-8.135vw;width:16.27vw;height:16.27vw}._21u5t50{display:flex;align-items:center}._21u5t51{margin-left:-2.265vw}._21u5t52{margin-bottom:-2.265vw;margin-left:calc(50% - 2.265vw)}._21u5t53{display:flex;width:4.53vw;height:4.53vw}._21u5t54{font-size:3.47vw;font-family:PingFangSC-Semibold,PingFang SC;font-weight:600;color:#243e66;line-height:4.53vw;white-space:nowrap}.in1agy0{margin-bottom:-.4vw;display:flex;flex-direction:column;align-items:center}.in1agy1{padding:1.07vw 2.4vw 1.6vw 2.67vw;background:#FFFFFF;box-shadow:0 .53vw 2.4vw #3f3f3f33;border-radius:2.13vw}.in1agy2{padding:2.67vw 2.67vw 2.4vw 3.2vw;background:#FFFFFF;box-shadow:0 0 2.67vw #4e556c26;border-radius:4.8vw;font-size:3.2vw;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:#1e1e1e;line-height:4.53vw;white-space:nowrap}.in1agy3{font-size:3.2vw;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:#1e1e1e;line-height:4.53vw;white-space:nowrap}.in1agy4{font-size:2.4vw;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#7e7e7e;line-height:3.47vw;white-space:nowrap}.in1agy5{color:#4471ff;font-family:PingFangSC-Medium,PingFang SC;font-weight:500}.in1agy6{margin-top:1.33vw;width:6.192vw;height:7.998vw}.in1agy7{margin-top:2.4vw;width:6.192vw;height:7.998vw}._15yrkbw1{margin-top:1.87vw;margin-bottom:-5.5vw;width:6vw;height:11vw}@keyframes sjs3320{0%{transform:scale(0);opacity:1}33.33%{transform:scale(.5);opacity:1}66.66%{transform:scale(1);opacity:0}to{transform:scale(1);opacity:0}}@keyframes sjs3321{0%{transform:scale(0);opacity:0}33.33%{transform:scale(0);opacity:1}66.66%{transform:scale(.5);opacity:1}to{transform:scale(1);opacity:0}}.sjs3322{display:flex;margin-bottom:-30.935vw;width:61.87vw;height:61.87vw;animation-name:sjs3320;animation-duration:3s;animation-iteration-count:infinite;animation-timing-function:linear}.sjs3323{animation-name:sjs3321}.nb7oxq0{width:100vw;height:100vh}
@@ -0,0 +1,11 @@
1
+ export declare enum AnchorType {
2
+ topLeft = "top-left",
3
+ topCenter = "top-center",
4
+ topRight = "top-right",
5
+ middleLeft = "middle-left",
6
+ center = "center",
7
+ middleRight = "middle-right",
8
+ bottomLeft = "bottom-left",
9
+ bottomCenter = "bottom-center",
10
+ bottomRight = "bottom-right"
11
+ }
@@ -0,0 +1,30 @@
1
+ import "@amap/amap-jsapi-types";
2
+ import { DefineComponent, SetupContext, VNode } from "vue-demi";
3
+ import type { VNodeChildren } from "vue/types/umd";
4
+ import type { ComponentOptionsBase } from "vue/types/v3-component-options";
5
+ import type { ComponentObjectPropsOptions } from "vue/types/v3-component-props";
6
+ import type { ObjectEmitsOptions, Slot } from "vue/types/v3-setup-context";
7
+ export type VNodeChild = VNode | VNodeChildren;
8
+ export type VueNode = VNode | null | undefined;
9
+ type LagecyPropNames<N> = N extends `on${string}` ? never : N;
10
+ export type EmitByProps<T, R = Required<T>> = {
11
+ [K in keyof R as K extends `on${infer N}` ? Uncapitalize<N> : never]: R[K];
12
+ };
13
+ type RenderFunction = (...args: any[]) => VNodeChild;
14
+ export type SC<P> = Omit<SetupContext<Extract<EmitByProps<P>, ObjectEmitsOptions>>, "slots"> & {
15
+ slots: {
16
+ [K in keyof P as Exclude<P[K], undefined> extends RenderFunction ? K extends `on${string}` ? never : K : never]: P[K];
17
+ } & {
18
+ default?: Slot;
19
+ };
20
+ };
21
+ export type SetupOptions<P> = ComponentOptionsBase<P, Empty, Empty, Empty, Empty, Empty, Empty, Extract<EmitByProps<P>, ObjectEmitsOptions>, Extract<keyof EmitByProps<P>, string>, Empty>;
22
+ export type Empty = Record<string, never>;
23
+ export declare function defineFc<P = Empty>(render: (props: P, ctx: SC<P>) => VueNode): DefineComponent<ComponentObjectPropsOptions<P>, Empty, Empty, Empty, Empty, Empty, Empty, Extract<EmitByProps<P, Required<P>>, ObjectEmitsOptions>, Extract<keyof EmitByProps<P, Required<P>>, string>, P, import("vue-demi").ExtractDefaultPropTypes<ComponentObjectPropsOptions<P>>>;
24
+ export declare function defineSetup<P>(setup: (props: P, ctx: SC<P>) => () => VueNode): DefineComponent<ComponentObjectPropsOptions<P>, Empty, Empty, Empty, Empty, Empty, Empty, Extract<EmitByProps<P, Required<P>>, ObjectEmitsOptions>, Extract<keyof EmitByProps<P, Required<P>>, string>, P, import("vue-demi").ExtractDefaultPropTypes<ComponentObjectPropsOptions<P>>>;
25
+ export declare function defineLagecySetup<P>(setup: (props: P, ctx: SC<P>) => () => VueNode): {
26
+ props: (propNames: LagecyPropNames<keyof P>[]) => DefineComponent<ComponentObjectPropsOptions<P>, Empty, Empty, Empty, Empty, Empty, Empty, Extract<EmitByProps<P, Required<P>>, ObjectEmitsOptions>, Extract<keyof EmitByProps<P, Required<P>>, string>, P, import("vue-demi").ExtractDefaultPropTypes<ComponentObjectPropsOptions<P>>>;
27
+ };
28
+ export declare function Noop(): void;
29
+ export declare const createElement: import("vue-demi").CreateElement;
30
+ export {};
@@ -0,0 +1 @@
1
+ export type Point = [number, number];
@@ -0,0 +1,21 @@
1
+ /// <reference types="google.maps" />
2
+ import { WatchCallback } from "vue-demi";
3
+ import type { Ref, ShallowRef, WatchOptions } from "vue/types/v3-generated";
4
+ import type { EmitFn } from "vue/types/v3-setup-context";
5
+ import type { EmitByProps } from "../types/helper";
6
+ export declare const deepCompareEqualsForMaps: import("fast-equals").EqualityComparator;
7
+ export declare function createDeepCompareMemoize<T>(): (value: T) => T;
8
+ export declare function useDeepCompareEffectForMaps(callback: () => () => any, dependencies: any[]): void;
9
+ export declare function watchNoneImmediatePostEffectForDeepOption<T>(getOption: () => T, callback: WatchCallback<T, T>, watchOptions?: WatchOptions<false>): import("vue-demi").WatchStopHandle;
10
+ export declare function watchPostEffectForDeepOption<T>(getOption: () => T, callback: WatchCallback<T, T | undefined>, watchOptions?: WatchOptions<true>): import("vue-demi").WatchStopHandle;
11
+ type AnyFunction = (...args: any[]) => any;
12
+ type PickSettableOptions<T, S, K extends keyof T = keyof T> = K extends `set${infer N}` ? Uncapitalize<N> extends S ? {
13
+ name: Uncapitalize<N>;
14
+ defaultValue?: T[K] extends AnyFunction ? Parameters<T[K]>[0] : never;
15
+ } : never : never;
16
+ export declare function watchPostEffectForMapProperty<T, P>(targetRef: ShallowRef<T | undefined> | Ref<T | undefined>, props: P, nameOptions: PickSettableOptions<T, keyof P>[], watchOptions?: WatchOptions<true>): void;
17
+ export declare function watchNoneImmediatePostEffectForMapProperty<T, P>(targetRef: ShallowRef<T | undefined> | Ref<T | undefined>, props: P, nameOptions: PickSettableOptions<T, keyof P>[], watchOptions?: WatchOptions<false>): void;
18
+ type NamesRestrict<N, S extends string> = N extends `on${string}` ? Lowercase<N> extends `on${S}` ? N : never : never;
19
+ export declare function watchPostEffectForAMapEvent<T extends AMap.Event, P, E extends string = AMap.EventType>(targetRef: ShallowRef<T | undefined> | Ref<T | undefined>, props: P, emit: EmitFn<EmitByProps<P>>, propertyNames: NamesRestrict<keyof P, E>[]): void;
20
+ export declare function watchPostEffectForGMapEvent<T extends google.maps.MVCObject, P>(targetRef: ShallowRef<T | undefined> | Ref<T | undefined>, props: P, emit: EmitFn<EmitByProps<P>>, propertyNames: NamesRestrict<keyof P, string>[]): void;
21
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { HTMLAttributes, ImgHTMLAttributes } from "vue/types/jsx";
2
+ export declare const createDom: (tag: string, props?: HTMLAttributes | ImgHTMLAttributes, innerHtml?: string) => HTMLElement;
@@ -0,0 +1,9 @@
1
+ /// <reference types="google.maps" />
2
+ export declare const vec2lnglat: ([lng, lat]: [number, number]) => google.maps.LatLngLiteral;
3
+ export interface AsteriskItem {
4
+ type: "normal" | "emphasize";
5
+ value: string;
6
+ }
7
+ export declare const decodeAsterisk: (encodedValue: string) => AsteriskItem[];
8
+ export declare const property2emitEventName: (propertyName: string) => string;
9
+ export declare const property2mapEventName: (propertyName: string) => string;
package/dist/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/esbuild.mjs ADDED
@@ -0,0 +1,40 @@
1
+ import { vanillaExtractPlugin } from "@vanilla-extract/esbuild-plugin";
2
+ import esbuild from "esbuild";
3
+ import { nodeExternalsPlugin } from "esbuild-node-externals";
4
+ import path from "path";
5
+ import unpluginVueJsx from "unplugin-vue-jsx/esbuild";
6
+ /** @typedef {import('esbuild').BuildOptions} BuildOptions */
7
+
8
+ /**
9
+ * @typedef Build
10
+ * @prop {BuildOptions['format']} format
11
+ * @prop {string} file
12
+ */
13
+
14
+ (async () => {
15
+ /** @type {Build[]} */
16
+ const builds = [
17
+ { format: "esm", file: "index.js" },
18
+ { format: "cjs", file: "index.cjs" },
19
+ ];
20
+ for (const { format, file } of builds) {
21
+ await esbuild.build({
22
+ entryPoints: ["./src/index.ts"],
23
+ bundle: true,
24
+ platform: "neutral",
25
+ jsx: "preserve",
26
+ format,
27
+ outfile: path.join("dist", file),
28
+ sourcemap: true,
29
+ target: "es2018",
30
+ plugins: [
31
+ nodeExternalsPlugin(),
32
+ unpluginVueJsx({ sourceMap: false }),
33
+ vanillaExtractPlugin(),
34
+ ],
35
+ loader: {
36
+ ".svg": "file",
37
+ },
38
+ });
39
+ }
40
+ })();
package/index.html ADDED
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" href="/favicon.ico" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Vite App</title>
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script type="module" src="/src/main.ts"></script>
12
+ </body>
13
+ </html>
package/package.json ADDED
@@ -0,0 +1,94 @@
1
+ {
2
+ "name": "@heycar/heycars-map",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "scripts": {
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
+ "build": "rm -rf dist && vite build && tsc --declarationDir dist --emitDeclarationOnly --noEmit false --declaration",
9
+ "preview": "vite preview"
10
+ },
11
+ "types": "./dist/index.d.ts",
12
+ "module": "./dist/index.js",
13
+ "main": "./dist/index.cjs",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js",
18
+ "require": "./dist/index.cjs"
19
+ },
20
+ "./dist/style.css": {
21
+ "import": "./dist/style.css",
22
+ "require": "./dist/style.css"
23
+ }
24
+ },
25
+ "dependencies": {
26
+ "@amap/amap-jsapi-loader": "^1.0.1",
27
+ "@amap/amap-jsapi-types": "^0.0.13",
28
+ "@googlemaps/js-api-loader": "^1.15.1",
29
+ "@googlemaps/typescript-guards": "^2.0.3",
30
+ "fast-equals": "^3.0.3",
31
+ "lodash-es": "^4.17.21",
32
+ "vue-demi": "^0.13.11"
33
+ },
34
+ "peerDependencies": {
35
+ "@vue/composition-api": "^1.0.0-rc.1",
36
+ "vue": "^2.7.0 || >=3.0.0"
37
+ },
38
+ "peerDependenciesMeta": {
39
+ "@vue/composition-api": {
40
+ "optional": true
41
+ }
42
+ },
43
+ "devDependencies": {
44
+ "@commitlint/cli": "^17.3.0",
45
+ "@commitlint/config-conventional": "^17.3.0",
46
+ "@commitlint/types": "^17.0.0",
47
+ "@types/google.maps": "^3.52.0",
48
+ "@types/lodash-es": "^4.17.6",
49
+ "@typescript-eslint/eslint-plugin": "^5.52.0",
50
+ "@typescript-eslint/parser": "^5.52.0",
51
+ "@vanilla-extract/css": "^1.9.5",
52
+ "@vanilla-extract/esbuild-plugin": "^2.2.1",
53
+ "@vanilla-extract/recipes": "^0.3.0",
54
+ "@vanilla-extract/vite-plugin": "^3.8.0",
55
+ "@vitejs/plugin-vue": "^4.0.0",
56
+ "@vitejs/plugin-vue-jsx": "^3.0.0",
57
+ "@vitejs/plugin-vue2": "^1.1.2",
58
+ "@vitejs/plugin-vue2-jsx": "^1.0.2",
59
+ "@vue/eslint-config-typescript": "^11.0.2",
60
+ "concurrently": "^7.6.0",
61
+ "eslint": "^8.34.0",
62
+ "eslint-config-prettier": "^8.6.0",
63
+ "eslint-plugin-import": "^2.27.5",
64
+ "eslint-plugin-prettier": "^4.2.1",
65
+ "eslint-plugin-vue": "^9.9.0",
66
+ "lint-staged": "^13.1.2",
67
+ "prettier": "^2.8.4",
68
+ "simple-git-hooks": "^2.8.1",
69
+ "typescript": "^4.9.3",
70
+ "unplugin-vue-jsx": "^0.1.2",
71
+ "vite": "^4.1.0",
72
+ "vite-plugin-checker": "^0.5.6",
73
+ "vite-plugin-eslint": "^1.8.1",
74
+ "vue": "2.7.14",
75
+ "vue-tsc": "^1.0.24"
76
+ },
77
+ "simple-git-hooks": {
78
+ "pre-commit": "pnpm exec lint-staged --concurrent false",
79
+ "commit-msg": "pnpm exec commitlint --edit ${1}"
80
+ },
81
+ "lint-staged": {
82
+ "*.{js,jsx,ts,tsx}": [
83
+ "eslint --fix",
84
+ "prettier --write"
85
+ ],
86
+ "*.{md,json,yml,html,css}": [
87
+ "prettier --write"
88
+ ]
89
+ },
90
+ "packageManager": "pnpm@7.18.1",
91
+ "engines": {
92
+ "node": ">=16.0.0"
93
+ }
94
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/src/App.tsx ADDED
@@ -0,0 +1,10 @@
1
+ import { defineComponent } from "vue-demi";
2
+ import { HeycarDemo } from "./components/Demo/HeycarDemo";
3
+
4
+ export const App = defineComponent({
5
+ setup() {
6
+ // return () => <Hello class={"helloclass2"} qyc={2} style={{ color: "red" }} />;
7
+ // return () => <GBusinessDemo />;
8
+ return () => <HeycarDemo />;
9
+ },
10
+ });
@@ -0,0 +1,87 @@
1
+ import { memoize } from "lodash-es";
2
+ import type { ApiMapMeta } from "./geometry";
3
+
4
+ const getGmapDirectionsService = memoize(() => {
5
+ return new google.maps.DirectionsService();
6
+ });
7
+
8
+ const getAmapDriving = memoize((options: AMap.DrivingOptions) => {
9
+ return new AMap.Driving(options);
10
+ }, JSON.stringify);
11
+
12
+ const getAmapWalking = memoize((options: AMap.WalkingOptions) => {
13
+ return new AMap.Walking(options);
14
+ }, JSON.stringify);
15
+
16
+ export interface ApiDrivingGetAddressProps extends ApiMapMeta {
17
+ origin: [number, number];
18
+ destination: [number, number];
19
+ // ferry?: 0 | 1,
20
+ // policy?: 0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20;
21
+ }
22
+ export const apiDrivingGetAddress = async (
23
+ props: ApiDrivingGetAddressProps
24
+ ): Promise<AMap.DrivingResult | undefined | google.maps.DirectionsResult> => {
25
+ const { isGoogle, origin, destination } = props;
26
+ if (!isGoogle) {
27
+ const amapDriving = getAmapDriving({});
28
+ return new Promise((resolve, reject) => {
29
+ amapDriving.search(
30
+ AMap.LngLat.from(origin),
31
+ AMap.LngLat.from(destination),
32
+ { waypoints: [] },
33
+ (status, result) => {
34
+ switch (status) {
35
+ case "complete":
36
+ return resolve(result as AMap.DrivingResult);
37
+ case "no_data":
38
+ return resolve(undefined);
39
+ default:
40
+ reject(result as Error);
41
+ }
42
+ }
43
+ );
44
+ });
45
+ }
46
+ const gmapDirectionsService = getGmapDirectionsService();
47
+ return await gmapDirectionsService.route({
48
+ origin: { lng: origin[0], lat: origin[1] },
49
+ destination: { lng: destination[0], lat: destination[1] },
50
+ travelMode: google.maps.TravelMode.DRIVING,
51
+ });
52
+ };
53
+
54
+ export interface ApiWalkingGetAddressProps extends ApiMapMeta {
55
+ origin: [number, number];
56
+ destination: [number, number];
57
+ }
58
+ export const apiWalkingGetAddress = async (
59
+ props: ApiWalkingGetAddressProps
60
+ ): Promise<AMap.WalkingResult | undefined | google.maps.DirectionsResult> => {
61
+ const { isGoogle, origin, destination } = props;
62
+ if (!isGoogle) {
63
+ const amapWalking = getAmapWalking({});
64
+ return new Promise((resolve, reject) => {
65
+ amapWalking.search(
66
+ AMap.LngLat.from(origin),
67
+ AMap.LngLat.from(destination),
68
+ (status, result) => {
69
+ switch (status) {
70
+ case "complete":
71
+ return resolve(result as AMap.WalkingResult);
72
+ case "no_data":
73
+ return resolve(undefined);
74
+ default:
75
+ reject(result as Error);
76
+ }
77
+ }
78
+ );
79
+ });
80
+ }
81
+ const gmapDirectionsService = getGmapDirectionsService();
82
+ return await gmapDirectionsService.route({
83
+ origin: { lng: origin[0], lat: origin[1] },
84
+ destination: { lng: destination[0], lat: destination[1] },
85
+ travelMode: google.maps.TravelMode.WALKING,
86
+ });
87
+ };
@@ -0,0 +1,88 @@
1
+ import { memoize } from "lodash-es";
2
+ import type { ApiMapMeta } from "./geometry";
3
+
4
+ const getGmapGeocoder = memoize(() => {
5
+ return new google.maps.Geocoder();
6
+ });
7
+
8
+ const getAmapGeocoder = memoize((options: AMap.GeocoderOptions) => {
9
+ return new AMap.Geocoder(options);
10
+ }, JSON.stringify);
11
+
12
+ // todo: 谷歌大部分接口都是用 placeId
13
+ export interface ApiGeocoderGetAddressProps extends ApiMapMeta {
14
+ location: [number, number];
15
+ country?: string;
16
+ // todo: 谷歌用的是邮政编码
17
+ city?: string;
18
+ lang?: string;
19
+ }
20
+ export const apiGeocoderGetAddress = async (
21
+ props: ApiGeocoderGetAddressProps
22
+ ): Promise<AMap.ReGeocoderResult | undefined | google.maps.GeocoderResult[]> => {
23
+ const { isGoogle, location, country, city, lang } = props;
24
+ if (!isGoogle) {
25
+ const amapGeocoder = getAmapGeocoder({ city, lang });
26
+ return new Promise((resolve, reject) => {
27
+ amapGeocoder.getAddress(AMap.LngLat.from(location), (status, result) => {
28
+ switch (status) {
29
+ case "complete":
30
+ return resolve(result as AMap.ReGeocoderResult);
31
+ case "no_data":
32
+ return resolve(undefined);
33
+ default:
34
+ reject(result as Error);
35
+ }
36
+ });
37
+ });
38
+ }
39
+ const gmapGeocoder = getGmapGeocoder();
40
+ const [lng, lat] = location;
41
+ const { results } = await gmapGeocoder.geocode({
42
+ location: new google.maps.LatLng({ lng, lat }),
43
+ language: lang,
44
+ componentRestrictions: {
45
+ country,
46
+ postalCode: city,
47
+ },
48
+ });
49
+ return results;
50
+ };
51
+
52
+ export interface ApiGeocoderGetAddressProps extends ApiMapMeta {
53
+ address: string;
54
+ country?: string;
55
+ // todo: 谷歌用的是邮政编码
56
+ city?: string;
57
+ lang?: string;
58
+ }
59
+ export const apiGeocoderGetLocation = async (
60
+ props: ApiGeocoderGetAddressProps
61
+ ): Promise<AMap.GeocoderResult | undefined | google.maps.GeocoderResult[]> => {
62
+ const { isGoogle, address, country, city, lang } = props;
63
+ if (!isGoogle) {
64
+ const amapGeocoder = getAmapGeocoder({ city, lang });
65
+ return new Promise((resolve, reject) => {
66
+ amapGeocoder.getLocation(address, (status, result) => {
67
+ switch (status) {
68
+ case "complete":
69
+ return resolve(result as AMap.GeocoderResult);
70
+ case "no_data":
71
+ return resolve(undefined);
72
+ default:
73
+ reject(result as Error);
74
+ }
75
+ });
76
+ });
77
+ }
78
+ const gmapGeocoder = getGmapGeocoder();
79
+ const { results } = await gmapGeocoder.geocode({
80
+ address,
81
+ language: lang,
82
+ componentRestrictions: {
83
+ country,
84
+ postalCode: city,
85
+ },
86
+ });
87
+ return results;
88
+ };
@@ -0,0 +1,44 @@
1
+ export interface ApiMapMeta {
2
+ isGoogle: boolean;
3
+ }
4
+
5
+ type Point = [number, number];
6
+ const point2latlng = ([lng, lat]: Point): google.maps.LatLngLiteral => ({ lng, lat });
7
+
8
+ export interface DistanceOfLineProps extends ApiMapMeta {
9
+ path: Point[];
10
+ }
11
+ export function apiDistanceOfLine(props: DistanceOfLineProps): number {
12
+ const { path, isGoogle } = props;
13
+ if (!isGoogle) {
14
+ return AMap.GeometryUtil.distanceOfLine(path);
15
+ }
16
+ return google.maps.geometry.spherical.computeLength(path.map(point2latlng));
17
+ }
18
+
19
+ export interface IsPointInRingProps extends ApiMapMeta {
20
+ point: Point;
21
+ path: Point[];
22
+ }
23
+ export function apiIsPointInRing(props: IsPointInRingProps): boolean {
24
+ const { point, path, isGoogle } = props;
25
+ if (!isGoogle) {
26
+ return AMap.GeometryUtil.isPointInRing(point, path);
27
+ }
28
+ const polygon = new google.maps.Polygon({ paths: path.map(point2latlng) });
29
+ return google.maps.geometry.poly.containsLocation(point2latlng(point), polygon);
30
+ }
31
+
32
+ export interface IsPointInLineProps extends ApiMapMeta {
33
+ point: Point;
34
+ path: Point[];
35
+ tolerance: number;
36
+ }
37
+ export function apiIsPointInLine(props: IsPointInLineProps): boolean {
38
+ const { point, path, tolerance, isGoogle } = props;
39
+ if (!isGoogle) {
40
+ return AMap.GeometryUtil.isPointOnLine(point, path, tolerance);
41
+ }
42
+ const polyline = new google.maps.Polyline({ path: path.map(point2latlng) });
43
+ return google.maps.geometry.poly.isLocationOnEdge(point2latlng(point), polyline, tolerance);
44
+ }
@@ -0,0 +1,107 @@
1
+ import { memoize } from "lodash-es";
2
+ import type { ApiMapMeta } from "./geometry";
3
+
4
+ const getGmapAutoCompleteService = memoize(() => {
5
+ return new google.maps.places.AutocompleteService();
6
+ });
7
+
8
+ const getAmapAutoComplete = memoize((options: AMap.AutoCompleteOptions) => {
9
+ return new AMap.AutoComplete(options);
10
+ }, JSON.stringify);
11
+
12
+ const getGmapPlacesService = memoize((map: google.maps.Map) => {
13
+ return new google.maps.places.PlacesService(map);
14
+ });
15
+
16
+ const getAmapPlaceSearch = memoize((options: AMap.PlaceSearchOptions) => {
17
+ return new AMap.PlaceSearch(options);
18
+ }, JSON.stringify);
19
+
20
+ export interface ApiAutoCompleteSearchProps extends ApiMapMeta {
21
+ keyword: string;
22
+ country?: string;
23
+ city?: string;
24
+ lang?: string;
25
+ }
26
+ export const apiAutoCompleteSearch = async (
27
+ props: ApiAutoCompleteSearchProps
28
+ ): Promise<AMap.AutocompleteResult | undefined | google.maps.places.AutocompletePrediction[]> => {
29
+ const { country, city, keyword, lang, isGoogle } = props;
30
+ if (!isGoogle) {
31
+ const amapAutoComplete = getAmapAutoComplete({ lang, city });
32
+ return new Promise((resolve, reject) => {
33
+ // todo 高德海外怎么传 country ?
34
+ amapAutoComplete.search(keyword, (status, result) => {
35
+ console.log("status, result = ", status, result);
36
+ switch (status) {
37
+ case "complete":
38
+ return resolve(result as AMap.AutocompleteResult);
39
+ case "no_data":
40
+ return resolve(undefined);
41
+ default:
42
+ reject(result as Error);
43
+ }
44
+ });
45
+ });
46
+ }
47
+ const gmapAutoCompleteService = getGmapAutoCompleteService();
48
+ const { predictions } = await gmapAutoCompleteService.getPlacePredictions({
49
+ input: keyword,
50
+ language: lang,
51
+ componentRestrictions: {
52
+ country,
53
+ postalCode: city,
54
+ } as google.maps.places.ComponentRestrictions,
55
+ });
56
+ return predictions;
57
+ };
58
+
59
+ export interface ApiPlaceSearchInBoundsProps extends ApiMapMeta {
60
+ keyword: string;
61
+ // 基于矩形的 southWest 和 northEast 的点构造矩形。
62
+ bounds: [[number, number], [number, number]];
63
+ // 只有谷歌支持
64
+ lang?: string;
65
+ // 谷歌地图必须提供 map 对象
66
+ map?: google.maps.Map;
67
+ }
68
+ export const apiPlaceSearchInBounds = async (
69
+ props: ApiPlaceSearchInBoundsProps
70
+ ): Promise<AMap.PlaceSearchResult | undefined | google.maps.places.PlaceResult[]> => {
71
+ const { map, keyword, bounds, lang, isGoogle } = props;
72
+ const pageSize = 20;
73
+ if (!isGoogle) {
74
+ const amapPlaceSearch = getAmapPlaceSearch({ pageSize });
75
+ return new Promise((resolve, reject) => {
76
+ amapPlaceSearch.searchInBounds(keyword, new AMap.Bounds(bounds), (status, result) => {
77
+ console.log("status, result = ", status, result);
78
+ switch (status) {
79
+ case "complete":
80
+ return resolve(result as AMap.PlaceSearchResult);
81
+ case "no_data":
82
+ return resolve(undefined);
83
+ default:
84
+ reject(result as Error);
85
+ }
86
+ });
87
+ });
88
+ }
89
+ if (!map) throw new Error("MyError: should provide google map");
90
+ const gmapPlacesService = getGmapPlacesService(map);
91
+ return new Promise<google.maps.places.PlaceResult[]>((resolve, reject) => {
92
+ const [[south, west], [north, east]] = bounds;
93
+ gmapPlacesService.textSearch(
94
+ {
95
+ bounds: { north, east, south, west },
96
+ language: lang,
97
+ query: keyword,
98
+ },
99
+ (result, status) => {
100
+ if (status === google.maps.places.PlacesServiceStatus.NOT_FOUND) return resolve([]);
101
+ if (status === google.maps.places.PlacesServiceStatus.OK)
102
+ return resolve(result as google.maps.places.PlaceResult[]);
103
+ reject(status);
104
+ }
105
+ );
106
+ });
107
+ };
@@ -0,0 +1 @@
1
+ <svg width="26" height="40" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient x1="-39.719%" y1="50%" x2="126.093%" y2="50%" id="prefix__a"><stop stop-color="#79AFFF" offset="0%"/><stop stop-color="#5C8DFF" offset="32.342%"/><stop stop-color="#507FFF" offset="74.853%"/><stop stop-color="#4471FF" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M11.5 24h3v14.5a1.5 1.5 0 01-3 0V24z" fill="#4C80FF"/><g><circle fill="url(#prefix__a)" cx="13" cy="13" r="13"/><circle fill="#FFF" cx="13" cy="13" r="4"/></g></g></svg>
@@ -0,0 +1 @@
1
+ <svg width="6" height="10" xmlns="http://www.w3.org/2000/svg"><path d="M1 1l4 4-4 4" stroke="#FFF" stroke-width="2" fill="none" fill-rule="evenodd" opacity=".8"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="24" height="31" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient x1="72.339%" y1="50%" x2="0%" y2="50%" id="prefix__a"><stop stop-color="#FF8447" offset="0%"/><stop stop-color="#FF8B4A" offset="50.596%"/><stop stop-color="#FFA95A" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M12 30.215c2.134 0 3.863-.893 3.863-1.995 0-1.1-1.73-1.994-3.863-1.994-2.134 0-3.863.893-3.863 1.994 0 1.102 1.73 1.995 3.863 1.995z" fill-opacity=".5" fill="#43485A"/><path d="M11 27.006c2.128 0-.9-3.743 5.621-6.643C19.842 18.453 22 14.953 22 10.95 22 4.902 17.075 0 11 0S0 4.902 0 10.95c0 3.918 2.068 7.356 5.177 9.29C11.75 23.284 9.06 27.007 11 27.007z" stroke="#FFF" fill="url(#prefix__a)" transform="translate(1 1.215)"/><text font-family="PingFangSC-Semibold, PingFang SC" font-size="12" font-weight="500" fill="#FFF" transform="translate(1 1.215)"><tspan x="5" y="15.449">终</tspan></text></g></svg>
@@ -0,0 +1 @@
1
+ <svg width="61" height="61" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><filter x="-7.1%" y="-7.1%" width="114.3%" height="114.3%" filterUnits="objectBoundingBox" id="prefix__a"><feOffset in="SourceAlpha" result="shadowOffsetOuter1"/><feGaussianBlur stdDeviation=".5" in="shadowOffsetOuter1" result="shadowBlurOuter1"/><feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"/><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.277453016 0" in="shadowBlurOuter1"/></filter><circle id="prefix__b" cx="30" cy="30" r="10.5"/></defs><g transform="translate(.405 .264)" fill="none" fill-rule="evenodd"><circle stroke-opacity=".1" stroke="#003DFF" fill-opacity=".15" fill="#4873FE" cx="30" cy="30" r="29.5"/><use fill="#000" filter="url(#prefix__a)" xlink:href="#prefix__b"/><circle stroke="#FFF" stroke-width="2.4" stroke-linejoin="square" fill="#4871F1" cx="30" cy="30" r="9.3"/></g></svg>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="17px" height="17px" viewBox="0 0 17 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>椭圆形</title>
4
+ <defs>
5
+ <circle id="path-1" cx="4.5" cy="9.5" r="4.5"></circle>
6
+ <filter x="-61.1%" y="-61.1%" width="222.2%" height="222.2%" filterUnits="objectBoundingBox" id="filter-2">
7
+ <feMorphology radius="1" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
8
+ <feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
9
+ <feGaussianBlur stdDeviation="1.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
10
+ <feComposite in="shadowBlurOuter1" in2="SourceAlpha" operator="out" result="shadowBlurOuter1"></feComposite>
11
+ <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.20435424 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
12
+ </filter>
13
+ </defs>
14
+ <g id="1.0" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
15
+ <g id="首页-即时用车-拖动光标" transform="translate(-228.000000, -322.000000)">
16
+ <g id="椭圆形" transform="translate(232.000000, 321.000000)">
17
+ <use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
18
+ <use stroke="#FFFFFF" stroke-width="2" fill="#346EFF" fill-rule="evenodd" xlink:href="#path-1"></use>
19
+ </g>
20
+ </g>
21
+ </g>
22
+ </svg>
@@ -0,0 +1 @@
1
+ <svg width="24" height="31" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient x1="0%" y1="50%" x2="129.599%" y2="50%" id="prefix__a"><stop stop-color="#36A8FF" offset="0%"/><stop stop-color="#4871F1" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M12 30.215c1.95 0 3.532-.816 3.532-1.823 0-1.007-1.581-1.823-3.532-1.823-1.95 0-3.532.816-3.532 1.823 0 1.007 1.581 1.823 3.532 1.823z" fill-opacity=".5" fill="#43485A"/><path d="M11 27c2.128 0-.9-3.742 5.621-6.641 3.221-1.91 5.379-5.41 5.379-9.412C22 4.901 17.075 0 11 0S0 4.901 0 10.947c0 3.918 2.068 7.355 5.177 9.29C11.75 23.277 9.06 27 11 27z" stroke="#FFF" fill="url(#prefix__a)" transform="translate(1 1.215)"/><text font-family="PingFangSC-Semibold, PingFang SC" font-size="12" font-weight="500" fill="#FFF" transform="translate(1 1.215)"><tspan x="5" y="15.624">起</tspan></text></g></svg>