File

models/scaleModel.ts

Constructor

constructor(options: any)

Properties

imperial
imperial: boolean
Default value: true
maxWidth
maxWidth: number
Default value: 100
metric
metric: boolean
Default value: true
position
position: string
Default value: bottomleft
updateWhenIdle
updateWhenIdle: boolean
Default value: true
export class scaleModel {
    constructor(options: any) {
        if (options !== null) {
            for (var key in options) {
                if (options[key] !== undefined) {
                    this[key] = options[key];
                }
            }
        }
    }
    maxWidth: number = 100;	//Maximum width of the control in pixels. The width is set dynamically to show round values (e.g. 100, 200, 500).
    metric: boolean = true;	//Whether to show the metric scale line (m/km).
    imperial: boolean = true;	//Whether to show the imperial scale line (mi/ft).
    updateWhenIdle: boolean = true;	//If true, the control is updated on moveend, otherwise it's always up-to-date (updated on move).
    position: string = "bottomleft"  //The position of the control (one of the map corners). Possible values are 'topleft', 'topright', 'bottomleft' or 'bottomright'
}

results matching ""

    No results matching ""