tg-map-vue3 3.6.5 → 3.6.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.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## 3.6.x
4
4
 
5
- - feat: 添加[MapUrls], 支持打开地图网页
5
+ - feat: 添加[MapUrls], 支持打开地图网页(导航和搜索)
6
6
  - feat: [LatLng]和[TgMarker]添加`normalize`相关方法/参数, 处理经纬度不合法的问题
7
7
  - fix: 百度地图的覆盖物([BaiduShape])不能隐藏填充/线条颜色的问题
8
8
  - perf: [TgLabel]/[TgInfoBox]/[TgInfoWindow]和[TgMarker]不必紧密相邻, 可以放其他组件
@@ -62,6 +62,7 @@ export declare class LatLng {
62
62
  /** 转换坐标到指定坐标系 */
63
63
  to(coordType: StringEnumValue<typeof CoordType>): LatLng;
64
64
  /**
65
+ * TODO: normalize要不要默认设为true, 和google的行为保持一致?
65
66
  * 转换成baidu的经纬度
66
67
  * @param normalize 转换时是否进行标准化, 默认false
67
68
  * @see _normalize {@macro latlng_normalize}
@@ -15,6 +15,10 @@ export declare abstract class MapUrls {
15
15
  * - baidu: 用{@link destination}当作起点
16
16
  */
17
17
  abstract directions(origin: Location | undefined, destination: Location, mode?: DirectionMode): URL;
18
+ /**
19
+ * 搜索
20
+ */
21
+ abstract search(location: Location): URL;
18
22
  }
19
23
  /**
20
24
  * @see https://developers.google.com/maps/documentation/urls/get-started
@@ -23,6 +27,8 @@ export declare class GoogleMapUrls extends MapUrls {
23
27
  static BASE_URL: string;
24
28
  /** @see https://developers.google.com/maps/documentation/urls/get-started#directions-action */
25
29
  directions(origin: Location | undefined, destination: Location, mode?: GoogleDirectionMode): URL;
30
+ /** @see https://developers.google.com/maps/documentation/urls/get-started#search-action */
31
+ search(location: Location): URL;
26
32
  }
27
33
  /**
28
34
  * @see https://lbsyun.baidu.com/faq/api?title=webapi/uri
@@ -31,5 +37,7 @@ export declare class BaiduMapUrls extends MapUrls {
31
37
  static BASE_URL: string;
32
38
  /** @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#:~:text=%E6%9C%8D%E5%8A%A1%E5%9C%B0%E5%9D%80-,http%3A//api.map.baidu.com/direction,-//PC%26Webapp%E6%9C%8D%E5%8A%A1 */
33
39
  directions(origin: Location | undefined, destination: Location, mode?: DirectionMode): URL;
40
+ /** @see https://lbsyun.baidu.com/faq/api?title=webapi/uri/web#%E5%9B%BE%E5%8C%BA%E5%8A%9F%E8%83%BD:~:text=%E4%B8%8D%E4%BF%9D%E8%AF%81%E6%9C%8D%E5%8A%A1%E3%80%82-,2.1.2%20%E5%9C%B0%E5%9D%80%E8%A7%A3%E6%9E%90,-%E8%B0%83%E7%94%A8%E8%AF%A5 */
41
+ search(location: Location): URL;
34
42
  }
35
43
  export {};
@@ -9,6 +9,15 @@ export declare namespace Strings {
9
9
  function trimIndent(str: string): string;
10
10
  /** 转换: `FuckYou` -> `fuck-you` */
11
11
  function pascal2kebab(str: string): string;
12
+ /**
13
+ * 简单判断字符串是否表示一个整数
14
+ * - `10` : ✅️
15
+ * - `-10`: ✅️
16
+ * - `+10`: ❌️
17
+ * - `2e2`: ❌️
18
+ * @see https://stackoverflow.com/questions/175739/how-can-i-check-if-a-string-is-a-valid-number
19
+ * */
20
+ function isInt(str: string): boolean;
12
21
  }
13
22
  /** @see https://github.com/browserify/path-browserify */
14
23
  export declare const path: {