leaflet-styleeditor-minified
Version:
Edit the style of features drawn within Leaflet.
52 lines (51 loc) • 1.82 kB
TypeScript
import { StyleEditorClass } from '../StyleEditorClass';
import { StyleEditorImpl } from '../StyleEditorImpl';
import { MarkerOptions } from './';
/**
* The Base class for different markers
*/
export interface MarkerClass {
new (styleEditor: StyleEditorImpl): Marker;
}
export declare abstract class Marker extends StyleEditorClass {
size: {
small: number[];
medium: number[];
large: number[];
};
selectIconSize: [];
colorRamp?: [];
selectIconClass: string;
defaultMarkerIcon?: L.Icon;
markers: string[];
constructor(styleEditor: StyleEditorImpl, selectIconClass: string);
/** create new Marker and show it */
setNewMarker(markerOptions: MarkerOptions): void;
/** set styling options */
setStyle(styleOption: any, value: any): void;
/** create HTML used to */
createSelectHTML(parentUiElement: any, iconOptions: any, icon: any): void;
/** get the current iconOptions
* if not set set them
*/
getIconOptions(): MarkerOptions;
getNewMarkerOptions(key: any, value: any): MarkerOptions;
abstract createMarkerIcon(iconOptions: MarkerOptions): any;
/** check that the icon set in the iconOptions exists
* else set default icon
*/
private ensureMarkerIcon;
/** return default marker color
*
* will return the first of the following which is set and supported by the markers
* 1. styleEditorOptions.defaultMarkerColor
* 2. styleEditorOptions.defaultColor
* 3. first color of the marker's colorRamp which is in the styleeditor.colorRamp
* 4. first color of the marker's colorRamp
* */
private getDefaultMarkerColor;
/** return size as keyword */
sizeToName(size: any): string;
/** return size as [x,y] */
sizeToPixel(size: any): any;
}