import * as L from 'leaflet'; import { CanvasShipService } from 'map-sdk-leaflet/es/sdk/CanvasShipService'; import { WeatherServiceImpl } from 'map-sdk-leaflet/es/sdk/plugins/weather/WeatherServiceImpl'; import { NavigationServiceImpl } from 'map-sdk-leaflet/es/sdk/plugins/NavigationServiceImpl'; import { PortCanvas } from 'map-sdk-leaflet/es/sdk/plugins/Port/PortCanvas'; import { TrackServiceImpl } from 'map-sdk-leaflet/es/sdk/plugins/Trackplayer/TrackServiceImpl'; import { TrackForecast } from 'map-sdk-leaflet/es/sdk/plugins/Trackplayer/TrackForecast'; import { type TrackDrawServiceImpl } from 'map-sdk-leaflet/es/sdk/plugins/TrackDraw/TrackDrawServiceImpl'; import { type AisManageOptions } from 'map-sdk-leaflet/es/sdk/plugins/Ais/AisManager'; import type { CanvasShipServiceOptions } from 'map-sdk-leaflet/es/sdk/CanvasShipService'; import type { LatLngGraticuleServer, OptionsLatLngGraticule } from 'map-sdk-leaflet/es/sdk/plugins/LatLngGraticuleServer'; import type { AreaViewSymbol, AreaViewSymbolOptions } from 'map-sdk-leaflet/es/sdk/plugins/AreaView/AreaViewSymbol'; declare type TileSource = 'sea' | 'google' | 'satellite'; declare type PartialTileSource = { [K in TileSource]?: TileUrlRecord; }; declare type TileUrlRecord = Record<'url' | 'errorTileUrl', string | Record>; /** * 地图接口参数 */ export interface ShipxyAPIOptions extends L.MapOptions { attribution?: { isShow: boolean; emptyString: string; }; mapTypes?: string[]; ak?: string; defaultMapType?: string; gratings?: { isShow: boolean; maxZoom: number; type: string; }; centerPoint?: [number, number]; measureCtrl?: { isShow: boolean; position: string; }; mousePostionCtrl?: { isShow: boolean; position: string; }; zoomControlElane?: { isShow: boolean; position: string; }; zoomviewControl?: { isShow: boolean; position: string; }; basemapsControl?: { isShow: boolean; position: string; }; mapReadyCallBack?: (map: L.Map) => void; scaleCtrl?: { isShow: boolean; position: string; }; addTileLayer?: L.TileLayer[]; cjhdTileLayer?: { isShow: boolean; }; miniMapControl?: { isShow: boolean; options?: any; }; tileLayer?: L.TileLayerOptions & PartialTileSource; } interface MyMapInterface { getMapType: () => string; } export declare type MyMapType = MyMap; export declare class MyMap extends L.Map implements MyMapInterface { [x: string]: any; static service: never[]; _options?: ShipxyAPIOptions; _hoverShipId: any; offsetC: boolean; _selShipId: Record; _size?: L.Point; _unselectedShipListener?: (params?: any) => void; mapType?: string; shipxy_tooltip?: L.Tooltip; shipxy_tooltip_timer?: ReturnType; weatherService: WeatherServiceImpl; shipsService: CanvasShipService; latlngGraticuleServer: LatLngGraticuleServer; areaViewSymbol: AreaViewSymbol; navigationService: NavigationServiceImpl; portCanvasService: PortCanvas; trackService: TrackServiceImpl; trackForecast: TrackForecast; static readonly defaultOptions: { attribution: { isShow: boolean; emptyString: string; }; attributionControl: boolean; mapTypes: string[]; ak: string; defaultMapType: string; gratings: { isShow: boolean; maxZoom: number; type: string; }; centerPoint: number[]; zoom: number; minZoom: number; maxZoom: number; measureCtrl: { isShow: boolean; position: string; }; mousePostionCtrl: { isShow: boolean; position: string; }; zoomControlElane: { isShow: boolean; position: string; }; zoomviewControl: { isShow: boolean; position: string; }; basemapsControl: { isShow: boolean; position: string; }; scaleCtrl: { isShow: boolean; position: string; }; addTileLayer: never[]; cjhdTileLayer: { isShow: boolean; }; miniMapControl: { isShow: boolean; options: {}; }; tileLayer: null; zoomControl: boolean; worldCopyJump: boolean; preferCanvas: boolean; wheelPxPerZoomLevel: number; zoomAnimation: boolean; markerZoomAnimation: boolean; zoomSnap: number; zoomDelta: number; fadeAnimation: boolean; wheelDebounceTime: number; }; constructor(id: string | HTMLElement, options?: ShipxyAPIOptions); getMapType(): any; } /** * 公共接口 */ export declare class ShipxyAPI { static Map: typeof MyMap; static Control: {}; constructor(); static version: string; static GeoJSON: typeof L.GeoJSON; static geoJSON: typeof L.geoJSON; static geoJson: typeof L.geoJson; static Layer: typeof L.Layer; static LayerGroup: typeof L.LayerGroup; static layerGroup: typeof L.layerGroup; static FeatureGroup: typeof L.FeatureGroup; static featureGroup: typeof L.featureGroup; static LatLng: typeof L.LatLng; static latLng: typeof L.latLng; static Marker: typeof L.Marker; static marker: typeof L.marker; static Circle: typeof L.Circle; static circle: typeof L.circle; static circleMarker: typeof L.circleMarker; static Polyline: typeof L.Polyline; static polyline: typeof L.polyline; static Polygon: typeof L.Polygon; static polygon: typeof L.polygon; static Rectangle: typeof L.Rectangle; static rectangle: typeof L.rectangle; static DivIcon: typeof L.DivIcon; static divIcon: typeof L.divIcon; static extend: typeof L.Util.extend; static DomUtil: typeof L.DomUtil; static Util: typeof L.Util; static Browser: typeof L.Browser; static console: () => { log: (...params: any) => object; debug: (...params: any) => object; info: (...params: any) => object; warn: (...params: any) => object; error: (...params: any) => object; assert: (...params: any) => object; dir: (...params: any) => object; dirxml: (...params: any) => object; group: (...params: any) => object; groupEnd: (...params: any) => object; time: (...params: any) => object; timeEnd: (...params: any) => object; count: (...params: any) => object; trace: (...params: any) => object; profile: (...params: any) => object; profileEnd: (...params: any) => object; memory: (...params: any) => object; }; static _onAddController(map: any, _this: any): void; static addDefaultHooks(): void; /** * 提供船舶三角函数 * @param url * @param options * @returns */ static ShipSjService(url: string, options?: CanvasShipServiceOptions): any; static ShipService(map: MyMap, options?: CanvasShipServiceOptions): CanvasShipService; /** * 气象服务 * 气象服务 1、气温 2、气压 3、风 4、台风 5、潮汐 * @params map 地图对象 */ static WeatherService(map: MyMap): WeatherServiceImpl; /** * 经纬度网格服务 * 经纬度网格服务,显示经纬度网格。 * @params map 地图对象 * @params options 配置信息 */ static LatlngGraticuleServer(map: MyMap, options?: OptionsLatLngGraticule): LatLngGraticuleServer; /** * 晨昏线 * 经纬度网格服务,显示经纬度网格。 * @params map 地图对象 * @params options 配置信息 */ static TerminatorSymbolServer(map: MyMap): any; /** * 特殊区域展示服务 * 特殊区域展示服务 1、排放控制区 2、排放控制区(中国) 3、专属经济区 4、全球时区 5、全球海区 6、临海基线 * @params map 地图对象 * @params options 配置信息 */ static AreaViewSymbol(map: MyMap, options?: Partial | undefined): AreaViewSymbol; /** * 浮标展示服务 * 浮标展示服务,提供浮标显示、添加浮标、定位浮标等功能。 * @params map 地图对象 * @params options 配置信息 * { * onClick Object 单击事件,默认:undefined * onHover Object 悬浮事件,默认:undefined * flyToZoom Object 定位默认zoom,默认:10 * bigIconZoom Object 大图标显示级别,默认:6 * isShow Object 是否显示航标,默认:true * isShowTooltip Object 是否显示tooltip,默认:true * } * @return ShipxyAPI.NavigationServiceImpl | * * * @example * 初始化浮标展示服务 * ShipxyAPI.NavigationService(elane_map, { * isShow: true, * iconScale: 0.6, * smallIconScale: 0.8,//小图标显示比例 * isSelectedShowReal: false,//选中是否显示真实航标 * }); */ static NavigationService(map: MyMap, options: any): NavigationServiceImpl; /** * 港口服务 * @param map * @param options * @returns */ static PortService(map: MyMap, options?: any): PortCanvas; /** * 轨迹服务 * @param map * @param options * @returns */ static TrackService(map: MyMap, options?: any): TrackServiceImpl; /** * 预测轨迹 * @param map * @param options * @returns */ static TrackForecast(map: MyMap): TrackForecast; /** * 航行警告 * @param map * @param options * @returns */ static NavigationalWarning(map: MyMap, options?: any): any; /** * 航线绘制 * @param map * @param data * @param options * @returns */ static trackDrawSymbol(map: any, options?: any, data?: any): TrackDrawServiceImpl; /** * 绘制图层 * @param map * @param options * @returns */ static overLayers(map: MyMap, options?: {}): any; /** * ais 图层工具展示 * @param map * @param options * @returns */ static aisManagerService(map: MyMap, options?: Partial): any; /** * 地图定位 * @param map * @param lat * @param lng * @param layer * @returns */ static locationMap(map: MyMap, lat: number, lng: number, layer?: any): L.Marker; /** * 取消定位 * @param map * @param layer */ static removeLocationMap(map: MyMap, layer?: any): void; } export {};