tg-map-vue3
Version:
封装 百度地图, Google地图, Here地图(未完成) 的Vue3组件库
20 lines (19 loc) • 1.48 kB
TypeScript
import type { BaiduInfoBox } from './map/overlay/baidu-info-box';
import type { GoogleLabel } from './map/overlay/google-label';
/**
* Map相关的各种类型的联合, 可以用来简化一部分代码的书写
*/
export type UnionMap = google.maps.Map | BMap.Map | H.Map;
export type UnionBaiduIcon = BMap.Icon | BMap.Symbol;
export type UnionGoogleIcon = google.maps.Icon | google.maps.Symbol | google.maps.UrlIcon;
export type UnionInfoWindow = google.maps.InfoWindow | BMap.InfoWindow;
export type UnionAutocomplete = google.maps.places.Autocomplete | BMap.Autocomplete;
export type UnionPlacesService = google.maps.places.PlacesService | BMap.LocalSearch;
export type UnionGoogleOverlay = google.maps.Marker | google.maps.Polyline | google.maps.Polygon | google.maps.Circle | google.maps.Rectangle | GoogleLabel;
export type UnionBaiduOverlay = BMap.Marker | BMap.Polyline | BMap.Polygon | BMap.Circle | BMap.Label | BaiduInfoBox;
export type UnionGoogleEventTarget = google.maps.MVCObject;
export type UnionBaiduEventTarget = UnionBaiduOverlay | BMap.InfoWindow | BMap.Autocomplete | BMap.Map;
export type UnionBaiduShape = BMap.Polyline | BMap.Polygon | BMap.Circle;
export type UnionGoogleShape = google.maps.Polyline | google.maps.Polygon | google.maps.Circle | google.maps.Rectangle;
export type UnionControl = BMap.Control | HTMLElement;
export type GoogleLayer = google.maps.TrafficLayer | google.maps.TransitLayer | google.maps.KmlLayer | google.maps.BicyclingLayer;