lml-main
Version:
This is now a mono repository published into many standalone packages.
61 lines (60 loc) • 1.51 kB
TypeScript
import { AreaModel } from './area';
import { PositionModel } from '@lml/cosmo-ts-data';
export interface PolygonModel extends AreaModel {
}
export interface MarkerModel {
id: string;
title: string;
label?: string;
position: PositionModel;
}
export interface DefaultBounds {
lat: number;
lng: number;
zoom: number;
}
export interface IconModel {
fillColor?: string;
fillOpacity?: number;
path?: string;
scale?: number;
strokeColor?: string;
strokeWeight?: number;
zIndexLength: number;
url?: string;
labelOrigin?: any;
origin?: any;
anchor?: any;
size?: any;
scaledSize?: any;
}
export declare const defaultBounds: {
lat: number;
lng: number;
zoom: number;
};
/**
* A note on the zIndexLength property
* In order to prevent the icon labels overlapping
* we need to assign each courier a random z-index
* In order to give some icons a higher z index than others
* we create a random number with a given length
* Be aware that the max value of a z index is 2147483647
* So a zIndexLength that is greater than 9 is forbidden
*/
export declare const icons: () => {
[type: string]: IconModel;
};
export interface Path {
lat: number;
lng: number;
}
export interface ShapeModel {
fillColor: string;
fillOpacity: number;
strokeColor: string;
strokeOpacity: number;
strokeWeight: number;
paths: Path[];
}
export declare const makeShapeForType: (type: string) => Partial<ShapeModel>;