iotmapmanager
Version:
Manage markers, clusters, user marker or paths on IotMaps
50 lines (49 loc) • 1.55 kB
TypeScript
import { IotMapConfig } from './iot-map-config';
import { IotPath } from './iot-map-types';
import { IotMapManager } from './iot-map-manager';
import { Polyline as leafletPolyline, Marker } from 'leaflet';
import 'leaflet-polylineoffset';
/**
* Class IotMapPath displaying a path, with start, stop and mid points and with sub paths
*/
export declare class IotMapPath extends leafletPolyline {
private data;
private config;
private map;
private start;
private end;
private mids;
private additionalPaths;
/**
* Creates a path
* @param path - an IotPath containing information to display a path
* @param map - the map the path will be displayed on
* @param config - the config to use to display the path
*/
constructor(path: IotPath, map: IotMapManager, config: IotMapConfig);
/**
* returns a L.marker displayed on the start point of the path
*/
getStart(): Marker;
/**
* returns a L.marker displayed on the end point of the path
*/
getEnd(): Marker;
/**
* returns a L.marker list according to mid points defined in IotPath
*/
getMids(): Marker[];
/**
* returns a L.PolyLine array containing all additional paths
*/
getAdditionalPaths(): leafletPolyline[];
/**
* remove all points (start, end and mids points) from the map
*/
removeAllPos(): void;
/**
* calculate offset according to line number
* @param line - [1..4] line number from left to right
*/
private static getOffset;
}