gi-nx / MapOptions
ts
type MapOptions = {
accessToken?: string;
antialias?: boolean;
attributionControl?: boolean;
bearing?: number;
bearingSnap?: number;
bounds?: LngLatBoundsLike;
boxZoom?: boolean;
center?: LngLatLike;
clickTolerance?: number;
collectResourceTiming?: boolean;
config?: {
[key: string]: ConfigSpecification;
};
container: HTMLElement | string;
contextCreateOptions?: ContextOptions;
cooperativeGestures?: boolean;
crossSourceCollisions?: boolean;
customAttribution?: string | string[];
devtools?: boolean;
doubleClickZoom?: boolean;
dragPan?: boolean | DragPanOptions;
dragRotate?: boolean;
fadeDuration?: number;
failIfMajorPerformanceCaveat?: boolean;
fitBoundsOptions?: EasingOptions;
hash?: boolean | string;
interactive?: boolean;
keyboard?: boolean;
language?: string;
locale?: Partial<typeof defaultLocale>;
localFontFamily?: string;
localIdeographFontFamily?: string;
logoPosition?: ControlPosition;
maxBounds?: LngLatBoundsLike;
maxPitch?: number;
maxTileCacheSize?: number;
maxZoom?: number;
minPitch?: number;
minTileCacheSize?: number;
minZoom?: number;
performanceMetricsCollection?: boolean;
pitch?: number;
pitchRotateKey?: PitchRotateKey;
pitchWithRotate?: boolean;
precompilePrograms?: boolean;
preserveDrawingBuffer?: boolean;
projection?: ProjectionSpecification | string;
refreshExpiredTiles?: boolean;
renderWorldCopies?: boolean;
repaint?: boolean;
respectPrefersReducedMotion?: boolean;
scaleFactor?: number;
scrollZoom?: boolean | ScrollZoomHandlerOptions;
spriteFormat?: SpriteFormat;
style?: StyleSpecification | string;
tessellationStep?: number;
testMode?: boolean;
touchPitch?: boolean | TouchPitchHandlerOptions;
touchZoomRotate?: boolean | TouchZoomRotateHandlerOptions;
trackResize?: boolean;
transformRequest?: RequestTransformFunction;
worldview?: string;
zoom?: number;
};Properties
| Property | Type |
|---|---|
accessToken? | string |
antialias? | boolean |
attributionControl? | boolean |
bearing? | number |
bearingSnap? | number |
bounds? | LngLatBoundsLike |
boxZoom? | boolean |
center? | LngLatLike |
clickTolerance? | number |
collectResourceTiming? | boolean |
config? | { [key: string]: ConfigSpecification; } |
container | HTMLElement | string |
contextCreateOptions? | ContextOptions |
cooperativeGestures? | boolean |
crossSourceCollisions? | boolean |
customAttribution? | string | string[] |
devtools? | boolean |
doubleClickZoom? | boolean |
dragPan? | boolean | DragPanOptions |
dragRotate? | boolean |
fadeDuration? | number |
failIfMajorPerformanceCaveat? | boolean |
fitBoundsOptions? | EasingOptions |
hash? | boolean | string |
interactive? | boolean |
keyboard? | boolean |
language? | string |
locale? | Partial<typeof defaultLocale> |
localFontFamily? | string |
localIdeographFontFamily? | string |
logoPosition? | ControlPosition |
maxBounds? | LngLatBoundsLike |
maxPitch? | number |
maxTileCacheSize? | number |
maxZoom? | number |
minPitch? | number |
minTileCacheSize? | number |
minZoom? | number |
performanceMetricsCollection? | boolean |
pitch? | number |
pitchRotateKey? | PitchRotateKey |
pitchWithRotate? | boolean |
precompilePrograms? | boolean |
preserveDrawingBuffer? | boolean |
projection? | ProjectionSpecification | string |
refreshExpiredTiles? | boolean |
renderWorldCopies? | boolean |
repaint? | boolean |
respectPrefersReducedMotion? | boolean |
scaleFactor? | number |
scrollZoom? | boolean | ScrollZoomHandlerOptions |
spriteFormat? | SpriteFormat |
style? | StyleSpecification | string |
tessellationStep? | number |
testMode? | boolean |
touchPitch? | boolean | TouchPitchHandlerOptions |
touchZoomRotate? | boolean | TouchZoomRotateHandlerOptions |
trackResize? | boolean |
transformRequest? | RequestTransformFunction |
worldview? | string |
zoom? | number |