models/scaleModel.ts
constructor(options: any)
|
Defined in models/scaleModel.ts:1
|
imperial |
imperial: |
Default value: true
|
Defined in models/scaleModel.ts:13
|
maxWidth |
maxWidth: |
Default value: 100
|
Defined in models/scaleModel.ts:11
|
metric |
metric: |
Default value: true
|
Defined in models/scaleModel.ts:12
|
position |
position: |
Default value: bottomleft
|
Defined in models/scaleModel.ts:15
|
updateWhenIdle |
updateWhenIdle: |
Default value: true
|
Defined in models/scaleModel.ts:14
|
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'
}