import { MapProps } from '@vnxjs/components'; import Vnmf from '../../index' declare module '../../index' { /** `MapContext` Example,Through [Vnmf.createMapContext](./createMapContext) Fetch。 * `MapContext` Through id With one. map Component binding,Operation corresponds to map Component。 * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.html */ interface MapContext { /** Get Latitude of the Current Map Center。♪ Back to the back gcj02 Coordinate System,Can be used [Vnmf.openLocation()](/docs/apis/location/openLocation) * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.getCenterLocation.html */ getCenterLocation(option?: MapContext.GetCenterLocationOption): Promise /** Set Position Point Icon,Support network paths、Local Path、Package Path * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.setLocMarkerIcon.html */ setLocMarkerIcon(option?: MapContext.SetLocMarkerIconOption): Promise /** Move the map centre to current location,The map component needs to be set up at this time show-location Yes.true。 * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.moveToLocation.html */ moveToLocation(option: MapContext.MoveToLocationOption): Promise /** Movemarker,Activate Paints * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.translateMarker.html */ translateMarker(option: MapContext.TranslateMarkerOption): Promise /** Move along the specified path marker,For trajectories and replay scenes。Activate echo event when animation is finished,If Animation is in progress,Yes, it's the same. marker Call again moveAlong Methodology,The previous animation will be interrupted.。 */ moveAlong(object) /** Zoom-in view shows all latitudes * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.includePoints.html */ includePoints(option: MapContext.IncludePointsOption): Promise /** Retrieve the field of view current map * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.getRegion.html */ getRegion(option?: MapContext.GetRegionOption): Promise /** Retrieve the rotation angle of current map * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.getRotate.html */ getRotate(option?: MapContext.GetRotateOption): Promise /** Retrieve the tilt angle of current map * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.getSkew.html */ getSkew(option?: MapContext.GetSkewOption): Promise /** Retrieve the scaling level of current map * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.getScale.html */ getScale(option?: MapContext.GetScaleOption): Promise /** Set map centre point offset,Downwards to Growth,Screen Scale Range(0.25~0.75),Default Offset To[0.5, 0.5] * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.setCenterOffset.html */ setCenterOffset(option: MapContext.SetCenterOffsetOption): Promise /** Remove Personalized Layer。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.removeCustomLayer.html */ removeCustomLayer(option: MapContext.RemoveCustomLayerOption): Promise /** Add Personalized Layer。Layer Create Reference Document * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.addCustomLayer.html */ addCustomLayer(option: MapContext.AddCustomLayerOption): Promise /** Create a custom picture layer,Pictures tend to zoom as the map zooms.。 * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.addGroundOverlay.html */ addGroundOverlay(option: MapContext.AddGroundLayerOption): Promise /** Add Visible Layer。Time to refresh,interval The minimum value that can be set is 15 s。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.addVisualLayer.html */ addVisualLayer(option: MapContext.AddVisualLayerOption): Promise /** Remove Visible Layer。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.removeVisualLayer.html */ removeVisualLayer(option: MapContext.RemoveVisualLayerOption): Promise /** Add arc,A pass point and an angle must be set.。The point of passage must be within the range effective coordinates departure.,Otherwise, the right arc cannot be generated.,When also setting the angle of,By angle of。The angle is defined as the starting point to end.,The angle of rotation with the external cut-off inverse clockwise from starting point。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.addArc.html */ addArc(option: MapContext.AddArcOption): Promise /** Remove arc。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.removeArc.html */ removeArc(option: MapContext.RemoveArcOption): Promise /** Limit the display range of map。This interface also limits the minimum integer level of map。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.setBoundary.html */ setBoundary(option: MapContext.SetBoundaryOption): Promise /** Update Custom Picture Layer。 * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.updateGroundOverlay.html */ updateGroundOverlay(option: MapContext.UpdateGroundOverlayOption): Promise /** Remove Custom Picture Layer。 * @supported weapp, tt * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.removeGroundOverlay.html */ removeGroundOverlay(option: MapContext.RemoveGroundOverlayOption): Promise /** Get screen coordinates corresponding to longitude,The coordinates are the top left corner of map.。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.toScreenLocation.html */ toScreenLocation(option: MapContext.ToScreenLocationOption): Promise /** Retrieve the latitude of point on screen,The coordinates are the top left corner of map.。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.fromScreenLocation.html */ fromScreenLocation(option: MapContext.FromScreenLocationOption): Promise /** Pull up the map.APPSelect Navigation。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.openMapApp.html */ openMapApp(option: MapContext.OpenMapAppOption): Promise /** Add marker。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.addMarkers.html */ addMarkers(option: MapContext.AddMarkersOption): Promise /** Remove marker。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.removeMarkers.html */ removeMarkers(option: MapContext.RemoveMarkersOption): Promise /** Configuration of initial point aggregations,Use default configuration when not called。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.initMarkerCluster.html */ initMarkerCluster(option?: MapContext.InitMarkerClusterOption): Promise /** Interception of map events。 * @supported weapp * @example * ```tsx * MapContext.on('markerClusterCreate', (res) => {}) * MapContext.on('markerClusterClick', (res) => {}) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/MapContext.on.html */ on( /** Event Name */ event: keyof MapContext.MapEvent, /** Event echo function */ callback: (res: MapContext.MapEvent[keyof MapContext.MapEvent]) => void ): void } namespace MapContext { interface GetCenterLocationOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: ( result: GetCenterLocationSuccessCallbackResult, ) => void } interface GetCenterLocationSuccessCallbackResult extends VnmfGeneral.CallbackResult { /** Latitude */ latitude: number /** Longitude */ longitude: number /** Call Results */ errMsg: string } interface SetLocMarkerIconOption { /** Icon Path,Support network paths、Local Path、Package Path */ iconPath: string /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface GetRegionOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: ( result: GetRegionSuccessCallbackResult, ) => void } interface GetRegionSuccessCallbackResult extends VnmfGeneral.CallbackResult { /** Latitude northeast corner */ northeast: MapPosition /** Latitude southwest corner */ southwest: MapPosition } interface GetRotateOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: ( result: GetRotateSuccessCallbackResult, ) => void } interface GetRotateSuccessCallbackResult extends VnmfGeneral.CallbackResult { /** Rotation Angle */ rotate: number /** Call Results */ errMsg: string } interface GetScaleOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: ( result: GetScaleSuccessCallbackResult, ) => void } interface GetScaleSuccessCallbackResult extends VnmfGeneral.CallbackResult { /** Zoom Value */ scale: number /** Call Results */ errMsg: string } interface GetSkewOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (result: GetSkewSuccessCallbackResult) => void } interface GetSkewSuccessCallbackResult extends VnmfGeneral.CallbackResult { /** Tilt Angle */ skew: number /** Call Results */ errMsg: string } interface IncludePointsOption { /** List of coordinates to be displayed in a visible area */ points: MapPosition[] /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Distance between the rectangular edge of coordinates point and map,Unit Pixels。Format As[Let's go.,Right,Down,Left],Andre will only be able to identify the first item in array.,Up and down.paddingUnanimously.。Developer tool not supported for the time beingpaddingParameters。 */ padding?: number[] /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } /** Coordinate Point */ interface MapPosition { /** Latitude */ latitude: number /** Longitude */ longitude: number } /** Latitude range */ interface MapBoundary { /** Latitude southwest corner */ southwest: MapPosition /** Latitude northeast corner */ northeast: MapPosition } interface MoveToLocationOption { /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Latitude */ latitude?: number /** Longitude */ longitude?: number /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface TranslateMarkerOption { /** Whether to rotate automatically during the move marker */ autoRotate: boolean /** Assign marker Move to Target Point */ destination: MapPosition /** Assign marker */ markerId: number /** marker Rotation angle of the */ rotate: number /** Animated end-of-paint echo function */ animationEnd?: (...args: any[]) => any /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Animation continues for a long time,Move and rotate separately */ duration?: number /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface SetCenterOffsetOption { /** Offset,Two numeric arrays */ offset: number[] /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface RemoveCustomLayerOption { /** Personalized Layerid */ layerId: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface AddCustomLayerOption { /** Personalized Layerid */ layerId: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface AddGroundLayerOption { /** Picture Layer id */ id: number /** Picture Path,Support Web Pictures、Temporary Path、Package Path */ src: string /** Latitude range over which the picture is covered */ bounds: MapBoundary /** Visible * @default true */ visible?: boolean /** Layer Drawing Order * @default 1 */ zIndex?: number /** Layer Transparency * @default 1 */ opacity?: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface AddVisualLayerOption { /** Personalized Layerid([Create Layer Direction](https://lbs.qq.com/dev/console/layers/layerEdit)) */ layerId: number /** Refresh Cycle,Unit seconds * @default 0 */ interval?: number /** Layer Drawing Order * @default 1 */ zIndex?: number /** Layer Transparency * @default 1 */ opacity?: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface RemoveVisualLayerOption { /** Visualize Layer id */ layerId: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface AddArcOption { /** Arc id */ id: number /** Start point */ start: MapPosition /** Endpoint */ end: MapPosition /** Passpoint */ pass?: MapPosition /** Corner Angle * @default 0 */ angle?: number /** Width * @default 5 */ width?: number /** Colour of the line * @default "#000000" */ color?: string /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface RemoveArcOption { /** Arc id */ id: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface SetBoundaryOption { /** Latitude southwest corner */ southwest: MapPosition /** Latitude northeast corner */ northeast: MapPosition /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface UpdateGroundOverlayOption { /** Picture Layer id */ id: number /** Picture Path,Support Web Pictures、Temporary Path、Package Path */ src: string /** Latitude range over which the picture is covered */ bounds: MapBoundary /** Visible * @default true */ visible?: boolean /** Layer Drawing Order * @default 1 */ zIndex?: number /** Layer Transparency * @default 1 */ opacity?: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface RemoveGroundOverlayOption { /** Picture Layer id */ id: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface ToScreenLocationOption { /** Latitude */ latitude: number /** Longitude */ longitude: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface FromScreenLocationOption { /** x Coordinate value */ x: number /** y Coordinate value */ y: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface OpenMapAppOption { /** Destination Longitude */ longitude: number /** Latitude of destination */ latitude: number /** Destination Name */ destination: string /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface AddMarkersOption { /** Synchronising folder map Component marker Properties */ markers: MapProps.marker[] /** Do you want to empty all the maps first? marker * @default false */ clear?: boolean /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface RemoveMarkersOption { /** marker It's... it's... id Gather!。 */ markerIds: string[] /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } interface InitMarkerClusterOption { /** Enable default polymer styles * @default true */ enableDefaultStyle?: boolean /** Whether to separate the polymers when clicking on a point of marking that has been condensed * @default true */ zoomOnClick?: boolean /** Aggregable distance for polymerisation algorithms,This means that a point smaller than value will converge together.,Pixels * @default 60 */ gridSize?: number /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void } /** event Legal value [v] */ interface MapEvent { /** Trigger when scaling or dragging results in the creation of a new polymer,Only return newly created aggregator information */ markerClusterCreate: MapEventMarkerClusterCreate /** Click event on the binder */ markerClusterClick: MapEventMarkerClusterClick } interface MapEventMarkerClusterCreate { /** Aggregation cluster data */ clusters: ClusterInfo[] } interface MapEventMarkerClusterClick { /** Aggregator */ cluster: ClusterInfo } interface ClusterInfo { /** It's a polymer. id */ clusterId: number /** Coordinates of the polymer */ center: LatLng /** The array of point-marked data within the convex */ markerIds: string[] } interface LatLng { /** Latitude */ lat: number /** Longitude value */ lng: number } } interface VnmfStatic { /** Create [map](/docs/components/maps/map) Context [MapContext](/docs/apis/media/map/MapContext) Object。 * @supported weapp, tt * @example * ```tsx * const mapCtx = Vnmf.createMapContext('myMap') * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/media/map/wx.createMapContext.html */ createMapContext( /** Map Component id */ mapId: string, /** Under Custom Components,Examples of the current componentthis,To operate inside the component Map Component */ component?: VnmfGeneral.IAnyObject, ): MapContext } }