@heycar/heycars-map 0.3.6 → 0.3.8

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 (177) hide show
  1. package/dist/business-components/AbsoluteAddressBox/AbsoluteAddressBox.d.ts +1 -2
  2. package/dist/business-components/AddressBox/AddressBox.d.ts +1 -2
  3. package/dist/business-components/BusinessQuotingMap/BusinessQuotingMap.d.ts +1 -0
  4. package/dist/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +1 -2
  5. package/dist/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.d.ts +1 -2
  6. package/dist/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +2 -3
  7. package/dist/business-components/DrivingLine/DrivingLine.d.ts +1 -2
  8. package/dist/business-components/DrivingRoute/DrivingRoute.d.ts +1 -2
  9. package/dist/business-components/PassengerCircle/PassengerCircle.d.ts +1 -2
  10. package/dist/business-components/PickupPoints/PickupPoints.d.ts +1 -2
  11. package/dist/business-components/PlaceCircle/PlaceCircle.d.ts +1 -2
  12. package/dist/business-components/StartEndPoint/StartEndPoint.d.ts +1 -2
  13. package/dist/business-components/TaxiCar/TaxiCar.d.ts +1 -2
  14. package/dist/business-components/WalkingLine/WalkingLine.d.ts +1 -2
  15. package/dist/business-components/WalkingRoute/WalkingRoute.d.ts +1 -2
  16. package/dist/business-components/WaveCircle/WaveCircle.d.ts +1 -2
  17. package/dist/components/Gmap/Gmap.css.d.ts +1 -0
  18. package/dist/components/MapProvider/MapProvider.d.ts +1 -2
  19. package/dist/hooks/useMapAutoComplete.d.ts +1 -2
  20. package/dist/hooks/useMapPlace.d.ts +2 -1
  21. package/dist/hooks/useMapRecomendPlace.d.ts +1 -1
  22. package/dist/hooks-business/useBusinessMapAutoComplete.d.ts +1 -2
  23. package/dist/index.cjs +55 -55
  24. package/dist/index.js +1923 -1999
  25. package/dist/style.css +1 -1
  26. package/package.json +1 -1
  27. package/todo.md +16 -4
  28. package/dist/Demo/CityBound/SearchDemo.d.ts +0 -1
  29. package/dist/Demo/CityBound/country.d.ts +0 -5
  30. package/dist/Demo/CityBound/searchResult.d.ts +0 -8
  31. package/dist/hooks/useMapLog.d.ts +0 -5
  32. package/src/App.tsx +0 -27
  33. package/src/Demo/CityBound/SearchDemo.tsx +0 -142
  34. package/src/Demo/CityBound/country.ts +0 -4179
  35. package/src/Demo/CityBound/searchResult.ts +0 -21122
  36. package/src/Demo/Demo.css.ts +0 -6
  37. package/src/Demo/Demo.tsx +0 -97
  38. package/src/Demo/DemoBusinessQuoting.tsx +0 -18
  39. package/src/Demo/DemoBusinessRecomendPlace.tsx +0 -89
  40. package/src/Demo/DemoBusinessTaxiEnd.tsx +0 -38
  41. package/src/Demo/DemoBusinessTaxiService.tsx +0 -58
  42. package/src/Demo/sample.json +0 -793
  43. package/src/api/contants.ts +0 -3
  44. package/src/api/driving.ts +0 -87
  45. package/src/api/geocoder.ts +0 -88
  46. package/src/api/geometry.ts +0 -44
  47. package/src/api/place.ts +0 -105
  48. package/src/assets/icons/svg/address-locator.svg +0 -1
  49. package/src/assets/icons/svg/arrow-right.svg +0 -1
  50. package/src/assets/icons/svg/end-point.svg +0 -1
  51. package/src/assets/icons/svg/passenger-circle.svg +0 -1
  52. package/src/assets/icons/svg/place-circle.svg +0 -22
  53. package/src/assets/icons/svg/start-point.svg +0 -1
  54. package/src/assets/icons/svg/taxi-car.svg +0 -1
  55. package/src/assets/icons/svg/wave-circle.svg +0 -1
  56. package/src/business-components/AbsoluteAddressBox/AbsoluteAddressBox.css.ts +0 -68
  57. package/src/business-components/AbsoluteAddressBox/AbsoluteAddressBox.tsx +0 -50
  58. package/src/business-components/AbsoluteAddressBox/index.ts +0 -1
  59. package/src/business-components/AddressBox/AddressBox.css.ts +0 -55
  60. package/src/business-components/AddressBox/AddressBox.tsx +0 -76
  61. package/src/business-components/AddressBox/index.ts +0 -1
  62. package/src/business-components/AddressLocator/AddressLocator.css.ts +0 -7
  63. package/src/business-components/AddressLocator/AddressLocator.tsx +0 -40
  64. package/src/business-components/AddressLocator/index.ts +0 -1
  65. package/src/business-components/BusinessQuotingMap/BusinessQuotingMap.tsx +0 -49
  66. package/src/business-components/BusinessQuotingMap/index.ts +0 -1
  67. package/src/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.tsx +0 -200
  68. package/src/business-components/BusinessRecomendPlaceMap/index.ts +0 -1
  69. package/src/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.tsx +0 -43
  70. package/src/business-components/BusinessTaxiEndMap/index.ts +0 -1
  71. package/src/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.tsx +0 -453
  72. package/src/business-components/BusinessTaxiServiceMap/index.ts +0 -1
  73. package/src/business-components/DrivingLine/DrivingLine.css.ts +0 -10
  74. package/src/business-components/DrivingLine/DrivingLine.tsx +0 -135
  75. package/src/business-components/DrivingLine/index.ts +0 -1
  76. package/src/business-components/DrivingRoute/DrivingRoute.tsx +0 -52
  77. package/src/business-components/DrivingRoute/index.ts +0 -1
  78. package/src/business-components/FitView/FitView.tsx +0 -22
  79. package/src/business-components/FitView/index.ts +0 -1
  80. package/src/business-components/PassengerCircle/PassengerCircle.css.ts +0 -21
  81. package/src/business-components/PassengerCircle/PassengerCircle.tsx +0 -69
  82. package/src/business-components/PassengerCircle/index.ts +0 -1
  83. package/src/business-components/PickupPoints/PickupPoints.tsx +0 -38
  84. package/src/business-components/PickupPoints/index.ts +0 -1
  85. package/src/business-components/PlaceCircle/PlaceCircle.css.ts +0 -76
  86. package/src/business-components/PlaceCircle/PlaceCircle.tsx +0 -110
  87. package/src/business-components/PlaceCircle/index.ts +0 -1
  88. package/src/business-components/StartEndPoint/StartEndPoint.css.ts +0 -70
  89. package/src/business-components/StartEndPoint/StartEndPoint.tsx +0 -122
  90. package/src/business-components/StartEndPoint/index.ts +0 -1
  91. package/src/business-components/TaxiCar/TaxiCar.css.ts +0 -16
  92. package/src/business-components/TaxiCar/TaxiCar.tsx +0 -93
  93. package/src/business-components/TaxiCar/index.ts +0 -1
  94. package/src/business-components/WalkingLine/WalkingLine.tsx +0 -80
  95. package/src/business-components/WalkingLine/index.ts +0 -1
  96. package/src/business-components/WalkingRoute/WalkingRoute.tsx +0 -43
  97. package/src/business-components/WalkingRoute/index.ts +0 -1
  98. package/src/business-components/WaveCircle/WaveCircle.css.ts +0 -54
  99. package/src/business-components/WaveCircle/WaveCircle.tsx +0 -59
  100. package/src/business-components/WaveCircle/index.ts +0 -1
  101. package/src/components/Amap/Amap.css.ts +0 -5
  102. package/src/components/Amap/Amap.ts +0 -76
  103. package/src/components/Amap/index.ts +0 -1
  104. package/src/components/AmapInfoWindow/AmapInfoWindow.ts +0 -45
  105. package/src/components/AmapInfoWindow/index.ts +0 -1
  106. package/src/components/AmapLoader/AmapLoader.ts +0 -20
  107. package/src/components/AmapLoader/index.ts +0 -1
  108. package/src/components/AmapMarker/AmapMarker.ts +0 -48
  109. package/src/components/AmapMarker/index.ts +0 -1
  110. package/src/components/AmapPolygon/AmapPolygon.ts +0 -41
  111. package/src/components/AmapPolygon/index.ts +0 -1
  112. package/src/components/AmapPolyline/AmapPolyline.ts +0 -40
  113. package/src/components/AmapPolyline/index.ts +0 -1
  114. package/src/components/AmapText/AmapText.ts +0 -39
  115. package/src/components/AmapText/index.ts +0 -1
  116. package/src/components/Gmap/Gmap.css.ts +0 -5
  117. package/src/components/Gmap/Gmap.ts +0 -56
  118. package/src/components/Gmap/index.ts +0 -1
  119. package/src/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.ts +0 -63
  120. package/src/components/GmapAdvancedMarkerView/index.ts +0 -1
  121. package/src/components/GmapInfoWindow/GmapInfoWindow.ts +0 -38
  122. package/src/components/GmapInfoWindow/index.ts +0 -1
  123. package/src/components/GmapLoader/GmapLoader.ts +0 -21
  124. package/src/components/GmapLoader/index.ts +0 -1
  125. package/src/components/GmapMarker/GmapMarker.ts +0 -34
  126. package/src/components/GmapMarker/index.ts +0 -1
  127. package/src/components/GmapPolygon/GmapPolygon.ts +0 -29
  128. package/src/components/GmapPolygon/index.ts +0 -1
  129. package/src/components/GmapPolyline/GmapPolyline.ts +0 -29
  130. package/src/components/GmapPolyline/index.ts +0 -1
  131. package/src/components/MapProvider/MapProvider.tsx +0 -81
  132. package/src/components/MapProvider/index.ts +0 -1
  133. package/src/hooks/useDrivingRoute.ts +0 -106
  134. package/src/hooks/useGeoLocation.ts +0 -70
  135. package/src/hooks/useHeycarMap.ts +0 -28
  136. package/src/hooks/useMap.ts +0 -43
  137. package/src/hooks/useMapAngle.ts +0 -42
  138. package/src/hooks/useMapAutoComplete.ts +0 -130
  139. package/src/hooks/useMapCityBound.ts +0 -64
  140. package/src/hooks/useMapDrag.ts +0 -72
  141. package/src/hooks/useMapEventSource.ts +0 -20
  142. package/src/hooks/useMapFitView.ts +0 -135
  143. package/src/hooks/useMapGeometry.ts +0 -27
  144. package/src/hooks/useMapLngLatToVw.ts +0 -31
  145. package/src/hooks/useMapLoader.ts +0 -164
  146. package/src/hooks/useMapLog.ts +0 -24
  147. package/src/hooks/useMapPlace.ts +0 -130
  148. package/src/hooks/useMapRecomendPlace.ts +0 -150
  149. package/src/hooks/useMapSupplier.ts +0 -16
  150. package/src/hooks/useOverlay.ts +0 -23
  151. package/src/hooks/usePlacesLabelDirection.ts +0 -61
  152. package/src/hooks/useUdate.ts +0 -9
  153. package/src/hooks/useWaitTimer.ts +0 -25
  154. package/src/hooks/useWalkingRoute.ts +0 -87
  155. package/src/hooks-business/useBusinessMapAutoComplete.ts +0 -22
  156. package/src/hooks-business/useBusinessQuotingMap.ts +0 -11
  157. package/src/hooks-business/useBusinessRecomendPlaceMap.ts +0 -45
  158. package/src/hooks-business/useBusinessTaxiServiceMap.ts +0 -12
  159. package/src/index.ts +0 -33
  160. package/src/main.ts +0 -6
  161. package/src/style.css +0 -0
  162. package/src/types/amap/autocomplete.d.ts +0 -64
  163. package/src/types/amap/driving.d.ts +0 -170
  164. package/src/types/amap/geocoder.d.ts +0 -217
  165. package/src/types/amap/marker.ts +0 -11
  166. package/src/types/amap/place.d.ts +0 -114
  167. package/src/types/amap/plugin.d.ts +0 -27
  168. package/src/types/amap/walking.d.ts +0 -78
  169. package/src/types/global.d.ts +0 -10
  170. package/src/types/helper.ts +0 -172
  171. package/src/types/interface.ts +0 -62
  172. package/src/types/mapHelper.ts +0 -1
  173. package/src/utils/compare.ts +0 -189
  174. package/src/utils/dom.ts +0 -14
  175. package/src/utils/helper.ts +0 -5
  176. package/src/utils/transform.ts +0 -68
  177. package/src/vite-env.d.ts +0 -12
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .n8tgem0{pointer-events:none;position:absolute;bottom:50%;left:0;right:0;margin-left:auto;margin-right:auto;display:flex;flex-direction:column;align-items:center;z-index:1}.n8tgem1{pointer-events:auto;padding:2.67vw 4.27vw;background:linear-gradient(90deg,#79AFFF 0%,#5C8DFF 32%,#507FFF 75%,#4471FF 100%);border-radius:3.2vw;display:flex;align-items:center}.n8tgem2{padding-right:2.67vw;max-width:41.33vw}.n8tgem3{display:-webkit-box;font-size:3.47vw;font-family:PingFangSC-Semibold,PingFang SC;font-weight:600;color:#fff;line-height:4.8vw;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.n8tgem4{margin-top:.53vw;font-size:2.93vw;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#fff;line-height:4.27vw;opacity:.8}.n8tgem5{width:1.758vw;height:2.93vw}.n8tgem6{width:.8vw;height:4vw;background:#4C80FF;border-radius:0vw 0vw 26.67vw 26.67vw}.n8tgem7{width:6.9355vw;height:10.67vw}.rgf09w0{width:7.1045vw;height:10.93vw;display:flex}._15rq2xn0{display:flex;flex-direction:column;align-items:center;margin-bottom:-1.6vw}._15rq2xn1{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}._15rq2xn2{font-size:3.47vw;font-family:PingFangSC-Semibold,PingFang SC;font-weight:600;color:#fff;line-height:4.8vw;white-space:nowrap}._15rq2xn3{font-size:2.93vw;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#eafaf8;line-height:4.27vw;white-space:nowrap;opacity:.8}._15rq2xn4{margin-left:3.2vw;width:1.44vw;height:2.4vw}._15rq2xn5{width:.8vw;height:4vw;background:#4C80FF;border-radius:0vw 0vw 26.67vw 26.67vw;z-index:1}._15rq2xn6{margin-top:-1.5vw;width:3.2vw;height:3.2vw}._1d8ur7t0,._7anfuo0{position:relative}._4a4ovk0{margin-bottom:-.4vw;display:flex;flex-direction:column;align-items:center}._4a4ovk1{padding:1.07vw 2.4vw 1.6vw 2.67vw;background:#FFFFFF;box-shadow:0 .53vw 2.4vw #3f3f3f33;border-radius:2.13vw}._4a4ovk2{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}._4a4ovk3{font-size:3.2vw;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:#1e1e1e;line-height:4.53vw;white-space:nowrap}._4a4ovk4{font-size:2.4vw;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#7e7e7e;line-height:3.47vw;white-space:nowrap}._4a4ovk5{color:#4471ff;font-family:PingFangSC-Medium,PingFang SC;font-weight:500}._4a4ovk6{margin-top:1.33vw;width:6.192vw;height:7.998vw}._4a4ovk7{margin-top:2.4vw;width:6.192vw;height:7.998vw}._1l6offo0{display:flex}._1l6offo1{width:4.53vw;height:4.53vw;margin-bottom:-2.265vw}._1l6offo2{width:16.27vw;height:16.27vw;margin-bottom:-8.135vw}.fhyw80{display:flex;align-items:center}.fhyw81{flex-direction:row-reverse}.fhyw83{margin-right:-2.265vw}.fhyw84{margin-left:-2.265vw}.fhyw85{margin-bottom:-2.265vw}.fhyw86{margin-right:calc(50% - 2.265vw)}.fhyw87{margin-left:calc(50% - 2.265vw)}.fhyw88{display:flex;width:4.53vw;height:4.53vw}.fhyw89{opacity:0}.fhyw8b{display:-webkit-box;font-size:3.2vw;font-family:PingFangSC-Semibold,PingFang SC;font-weight:600;color:#243e66;line-height:4.53vw;width:max-content;max-width:32vw;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}._65j3sr1{margin-top:1.87vw;margin-bottom:-5.5vw;width:6vw;height:11vw}@keyframes rrvp0y0{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 rrvp0y1{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}}.rrvp0y2{display:flex;margin-bottom:-30.935vw;width:61.87vw;height:61.87vw;animation-name:rrvp0y0;animation-duration:3s;animation-iteration-count:infinite;animation-timing-function:linear}.rrvp0y3{animation-name:rrvp0y1}
1
+ .n8tgem0{pointer-events:none;position:absolute;bottom:50%;left:0;right:0;margin-left:auto;margin-right:auto;display:flex;flex-direction:column;align-items:center;z-index:1}.n8tgem1{pointer-events:auto;padding:2.67vw 4.27vw;background:linear-gradient(90deg,#79AFFF 0%,#5C8DFF 32%,#507FFF 75%,#4471FF 100%);border-radius:3.2vw;display:flex;align-items:center}.n8tgem2{padding-right:2.67vw;max-width:41.33vw}.n8tgem3{display:-webkit-box;font-size:3.47vw;font-family:PingFangSC-Semibold,PingFang SC;font-weight:600;color:#fff;line-height:4.8vw;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.n8tgem4{margin-top:.53vw;font-size:2.93vw;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#fff;line-height:4.27vw;opacity:.8}.n8tgem5{width:1.758vw;height:2.93vw}.n8tgem6{width:.8vw;height:4vw;background:#4C80FF;border-radius:0vw 0vw 26.67vw 26.67vw}.n8tgem7{width:6.9355vw;height:10.67vw}.rgf09w0{width:7.1045vw;height:10.93vw;display:flex}._15rq2xn0{display:flex;flex-direction:column;align-items:center;margin-bottom:-1.6vw}._15rq2xn1{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}._15rq2xn2{font-size:3.47vw;font-family:PingFangSC-Semibold,PingFang SC;font-weight:600;color:#fff;line-height:4.8vw;white-space:nowrap}._15rq2xn3{font-size:2.93vw;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#eafaf8;line-height:4.27vw;white-space:nowrap;opacity:.8}._15rq2xn4{margin-left:3.2vw;width:1.44vw;height:2.4vw}._15rq2xn5{width:.8vw;height:4vw;background:#4C80FF;border-radius:0vw 0vw 26.67vw 26.67vw;z-index:1}._15rq2xn6{margin-top:-1.5vw;width:3.2vw;height:3.2vw}._1d8ur7t0{position:relative}._7anfuo0{height:inherit;width:inherit}._7anfuo1{position:relative}._4a4ovk0{margin-bottom:-.4vw;display:flex;flex-direction:column;align-items:center}._4a4ovk1{padding:1.07vw 2.4vw 1.6vw 2.67vw;background:#FFFFFF;box-shadow:0 .53vw 2.4vw #3f3f3f33;border-radius:2.13vw}._4a4ovk2{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}._4a4ovk3{font-size:3.2vw;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:#1e1e1e;line-height:4.53vw;white-space:nowrap}._4a4ovk4{font-size:2.4vw;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:#7e7e7e;line-height:3.47vw;white-space:nowrap}._4a4ovk5{color:#4471ff;font-family:PingFangSC-Medium,PingFang SC;font-weight:500}._4a4ovk6{margin-top:1.33vw;width:6.192vw;height:7.998vw}._4a4ovk7{margin-top:2.4vw;width:6.192vw;height:7.998vw}._1l6offo0{display:flex}._1l6offo1{width:4.53vw;height:4.53vw;margin-bottom:-2.265vw}._1l6offo2{width:16.27vw;height:16.27vw;margin-bottom:-8.135vw}.fhyw80{display:flex;align-items:center}.fhyw81{flex-direction:row-reverse}.fhyw83{margin-right:-2.265vw}.fhyw84{margin-left:-2.265vw}.fhyw85{margin-bottom:-2.265vw}.fhyw86{margin-right:calc(50% - 2.265vw)}.fhyw87{margin-left:calc(50% - 2.265vw)}.fhyw88{display:flex;width:4.53vw;height:4.53vw}.fhyw89{opacity:0}.fhyw8b{display:-webkit-box;font-size:3.2vw;font-family:PingFangSC-Semibold,PingFang SC;font-weight:600;color:#243e66;line-height:4.53vw;width:max-content;max-width:32vw;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}._65j3sr1{margin-top:1.87vw;margin-bottom:-5.5vw;width:6vw;height:11vw}@keyframes rrvp0y0{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 rrvp0y1{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}}.rrvp0y2{display:flex;margin-bottom:-30.935vw;width:61.87vw;height:61.87vw;animation-name:rrvp0y0;animation-duration:3s;animation-iteration-count:infinite;animation-timing-function:linear}.rrvp0y3{animation-name:rrvp0y1}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heycar/heycars-map",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite -c vite.config.dev.ts",
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. google/高德 坐标系转化
4
+ 3. 中心点 drag 期间位置
5
+ 4. 高德地图加载期间出现大量的请求
6
+ 5. google/高德 坐标系转化
6
7
 
7
8
  ---
8
9
 
@@ -12,9 +13,20 @@ 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
- 2. google cityparent 要用 city 上级,目前是 country 下级
20
- 3. 推荐点搜索是距离参数可能要优化,比如没搜到推荐点,应该扩大搜索距离
23
+ 1. 定位失败的视觉稿文字提示
24
+ 2. 用户手动输入地址,然后跳回 home 页面, centerplace 的 name 不正确
25
+ 3. 用户地址搜索,先设置台湾,搜个结果,然后切换城市到新加坡,搜索到结果依然是台湾
26
+
27
+ v0.3.8
28
+
29
+ - 4845
30
+ - 4898
31
+ - 4840
32
+ - 4827
@@ -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 declare const countries: Record<string, string>;
2
- export declare const citiesWithCountry: {
3
- name: string;
4
- country: string;
5
- }[];
@@ -1,8 +0,0 @@
1
- /// <reference types="google.maps" />
2
- export type Result = {
3
- name: string;
4
- country: string;
5
- bound: google.maps.LatLngBoundsLiteral | null;
6
- };
7
- export declare const searchResult: Result[];
8
- export declare const breakIdx = 3280;
@@ -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={"amap"}
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
- });