Expand description
Constructors§
Properties§
protected _ camera: CameraThe camera instance used for rendering the map
protected _ canvas: HTMLCanvasElementThe canvas element used for rendering the map
protected _ key Events: KeyEventsThe key events handler for keyboard interactions
protected _ layer Manager: LayerManagerThe layer manager instance used for managing map layers
protected _ map Events: MapEventsThe map events handler for map interactions
protected _ mouse Events: MouseEventsThe mouse events handler for mouse interactions
protected _ renderer: RendererThe renderer instance used for rendering the map
protected _ ui: AutkMapUiThe UI instance for managing the map's user interface
Accessors§
Source§get layerManager(): LayerManager
get layerManager(): LayerManager
Gets the layer manager instance used for managing map layers.
Methods§
Source§loadGeoJsonLayer(
layerName: string,
geojson: FeatureCollection,
typeLayer?: LayerType | null,
): void
loadGeoJsonLayer(
layerName: string,
geojson: FeatureCollection,
typeLayer?: LayerType | null,
): void
Loads a GeoJSON layer into the map.
This method creates a layer based on the provided GeoJSON data and adds it to the map's layer manager. Supported OSM layer types include:
- AUTK_OSM_SURFACE
- AUTK_OSM_WATER
- AUTK_OSM_PARKS
- AUTK_OSM_ROADS
- AUTK_OSM_BUILDINGS
Custom layers can also be loaded with types:
- AUTK_GEO_POINTS
- AUTK_GEO_POLYLINES
- AUTK_GEO_POLYGONS
- AUTK_RASTER
Source§loadGeoTiffLayer(
layerName: string,
geotiff: FeatureCollection,
typeLayer?: LayerType | null,
): void
loadGeoTiffLayer(
layerName: string,
geotiff: FeatureCollection,
typeLayer?: LayerType | null,
): void
Loads a GeoTIFF layer into the map. This method creates a layer based on the provided GeoTIFF data and adds it to the map's layer manager.
Source§updateGeoJsonLayerThematic(
layerName: string,
geojson: FeatureCollection,
getFnv: (feature: Feature) => string | number,
groupById?: boolean,
): void
updateGeoJsonLayerThematic(
layerName: string,
geojson: FeatureCollection,
getFnv: (feature: Feature) => string | number,
groupById?: boolean,
): void
Updates the thematic information of a layer based on a GeoJSON source.
This method extracts thematic values from the GeoJSON features using the provided function, normalizes these values, and updates the layer's thematic data accordingly.
Source§updateLayerGeometry(layerName: string, layerGeometry: ILayerGeometry[]): void
updateLayerGeometry(layerName: string, layerGeometry: ILayerGeometry[]): void
Updates the geometry of a layer.
Source§updateLayerThematic(layerName: string, layerThematic: ILayerThematic[]): void
updateLayerThematic(layerName: string, layerThematic: ILayerThematic[]): void
Updates the thematic information of a layer.
Source§updateRenderInfoProperty(
layerName: string,
property: keyof ILayerRenderInfo,
value: unknown,
): void
updateRenderInfoProperty(
layerName: string,
property: keyof ILayerRenderInfo,
value: unknown,
): void
Updates the render information of a layer.
The main autark map class.
AutkMapencapsulates the core logic for initializing and rendering a map on a given HTML canvas element. It manages the camera, map rendering, map layers, and user interactions through keyboard, mouse, and map events.