@abi-software/flatmap-viewer - v4.2.5
    Preparing search index...

    Class FlatMap

    Maps are not created directly but instead are created and loaded by LoadMap of MapViewer.

    Index

    Constructors

    Properties

    Methods

    Markers

    API calls to place amd remove different types of markers on a flatmap

    Constructors

    Properties

    • get anatomicalIdentifiers(): string[]

      The anatomical identifiers of features in the map.

      Returns string[]

    • get biologicalSex(): string

      The biological sex identifier of the species described by the map.

      Returns string

    • get bounds(): LngLatBoundsLike

      The flatmap's bounds.

      Returns LngLatBoundsLike

    • get datasets(): string[]

      Datasets associated with the map.

      Returns string[]

    • get has_flightpaths(): boolean

      Does the flatmap contain flightpath information?

      Returns boolean

      boolean

    • get id(): string

      The map's id as specified at generation time.

      Returns string

    • get taxon(): string

      The taxon identifier of the species described by the map.

      Returns string

    • get taxonIdentifiers(): string[]

      The taxon identifiers of species which the map's connectivity has been observed in.

      Returns string[]

    • get uniqueId(): string

      A unique identifier for the map within the viewer.

      Returns string

    • get url(): string

      The map's URL on the map server.

      Returns string

    • get uuid(): string

      The map's unique universal identifier.

      For published maps this is different to the map's id it might be the same as id for unpublished maps.

      Returns string

    Methods

    • Display an image on a given anatomical feature.

      Parameters

      • anatomicalId: string

        The anatomical identifier of the feature on which to place the image. The image is scaled to fit within the feature's bounding box.

      • imageUrl: string

        The URL of the image to display.

      • options: {} = {}

      Returns string

      A identifying the image(s) added to the map. A map may have several features corresponding to a particular anatomical identifier, which will result in an image being placed on each feature. null is returned if there are no features with the given anatomicalId.

    • Generate an annotation callback event when a drawn annotation has been created a modified.

      Parameters

      • eventType: string

        {string} Either created, updated or deleted

      • feature: AnnotatedFeature

        {AnnotatedFeature} A feature object with id, type, and geometry fields of a feature that has been created, updated or deleted.

      Returns void

    • Clear all drawn annotations from current annotation layer.

      Returns void

    • Clear any visibility filter on features and paths.

      Returns void

    • Mark a drawn/changed annotation as having been accepted by the user.

      Parameters

      • event: AnnotationEvent

        {AnnotationEvent} The object as received in an annotation callback

      Returns void

    • Generate a callback as a result of some event in a control.

      Parameters

      • eventType: string

        The event type

      • control: string

        The name of the control

      • value: string

        The value of the control

      Returns void

    • Show or hide connectivity features observed in particular species.

      Parameters

      • taxonIds: string | string[]

        A single taxon identifier or an array of identifiers.

      • enable: boolean = true

        Show or hide connectivity paths and features. Defaults to true (show)

      Returns void

    • Enable or disable reset selected features when click on an empty area.

      Parameters

      • enable: boolean = true

        Whether to enable the reset behavior. When enabled, click on empty space will reset the view. Defaults to true (enable)

      Returns void

    • Show/hide flight path view.

      Parameters

      • Optionalenable: boolean = true

      Returns void

    • Parameters

      • layerId: string

        The layer identifier to enable

      • enable: boolean = true

        Show or hide the layer. Defaults to true (show)

      Returns void

    • Enable/disable the neuron paths associated with a nerve centreline.

      Parameters

      • nerveModels: string | string[]

        Anatomical identifiers of nerve centrelines

      • Optionalenable: boolean = true

      Returns void

    • Generate callbacks as a result of panning/zooming the map.

      Parameters

      • enabled: boolean = true

        Generate callbacks when true, otherwise disable them.

      Returns void

    • Hide or show paths of a given type.

      Parameters

      • pathTypes: string | string[]
      • enable: boolean = true

        Show or hide paths of that type. Defaults to true (show)

      Returns void

    • Hide or show all paths valid in SCKAN.

      Parameters

      • sckanState: any

        Either valid or invalid

      • enable: boolean = true

        Show or hide paths with that SCKAN state. Defaults to true (show)

      Returns void

    • Parameters

      • systemId: string

        The identifier of the system to enable

      • enable: boolean = true

        Show or hide the system. Defaults to true (show)

      Returns void

    • Get valid keys and their value ranges to use when filtering feature and path visibility.

      Returns {}

      Value ranges are string arrays

    • Get the map's current background colour.

      Returns string

      The background colour.

    • Get the map's current background opacity.

      Returns number

      The background opacity.

    • Returns { biologicalSex: string; taxon: string; uuid: string }

    • Get all paths associated with a set of features.

      Parameters

      • geojsonIds: number | number[]

        GeoJSON ids of features

      Returns Promise<string[]>

      A Promise resolving to an array of path identifiers

    • Get the map's zoom settings.

      Returns { mapUUID: string; maxZoom: number; minZoom: number; zoom: number }

      The map's minimum, current, and maximum zoom levels.

    • Parameters

      • url: any
      • resource: string = 'flatmap/'

      Returns string

    • Generate a callback as a result of some event with a marker.

      Parameters

      • eventType: string

        The event type

      • markerId: number

        The marker's GeoJSON identifier

      • properties: FlatMapFeatureAnnotation

        Properties associated with the marker

      Returns void

    • Parameters

      • anatomicalIds: string[]

      Returns number[]

    • Parameters

      • anatomicalId: string

      Returns number[]

    • Parameters

      • featureId: number

      Returns string

    • Get model terms of all paths connected to a node.

      Parameters

      • nodeId: number

        The local (GeoJSON) identifier of a node

      Returns Set<string>

      Model terms of all paths connected to the node

    • Generate a callback as a result of panning/zooming the map.

      Parameters

      • type: string

        The event type, pan or zoom.

      Returns void

    • Pan/zoom the map to a new view

      Parameters

      • origin: [number, number]

        The map's normalised top-left corner

      • size: [number, number]

        The map's normalised size

      Returns void

    • Get GeoJSON feature ids of all nodes of a path model.

      Parameters

      • modelId: string

        The path's model identifier

      Returns number[]

      GeoJSON identifiers of features on the path

    • Returns PathType[]

      A array of objects giving the path types present in the map along with their descriptions and colours

    • Get knowledge about an entity from the flatmap's server's knowledge store.

      Parameters

      • entity: string

        The URI of an entity.

      Returns Promise<any>

      JSON describing the entity.

    • Get labels for entities from the flatmap's server's knowledge store.

      Parameters

      • entities: string | string[]

        Anatomical identifiers of entities.

      Returns Promise<EntityLabel[]>

    • Get all paths associated with a set of features.

      Parameters

      • entities: any

        Anatomical terms of features

      Returns Promise<string[]>

      A Promise resolving to an array of path identifiers

    • Return the feature as it is currently drawn. This is so the correct geometry can be saved with a feature should a user make changes before submitting dialog provided by an external annotator.

      Parameters

      Returns AnnotatedFeature

      The feature with currently geometry or null if the feature has been deleted.

    • Delete the selected drawn feature

      Returns void

    • Remove images for an anatomical features.

      Parameters

      • mapImageId: string

        An image identifier previously returned by addImage().

      Returns void

    • Remove the currently active popup from the map.

      Returns void

    • Reset a map to its initial state.

      Returns void

    • Mark a drawn/changed annotation as having been rejected by the user.

      Parameters

      • event: AnnotationEvent

        {AnnotationEvent} The object as received in an annotation callback

      Returns void

    • Select features on the map.

      Parameters

      • externalIds: string[]

        An array of anaotomical terms identifing features to select

      Returns void

    • Select features on the map.

      Parameters

      • geojsonIds: number | number[]

        A single GeoJSON feature identifiers or an array of identifiers.

      Returns void

    • Sets the map's background colour.

      Parameters

      • colour: string

        The colour

      Returns void

    • Sets the map's background opacity.

      Parameters

      • opacity: number

        The opacity

      Returns void

    • Parameters

      • options: {} = {}

      Returns void

    • Flag the feature as having external annotation.

      Parameters

      • featureId: string

        The feature's external identifier

      Returns void

    • Parameters

      • options: {} = {}

      Returns void

    • Show or hide a tool for drawing regions to annotate on the map.

      Parameters

      • Optionalvisible: boolean = true

      Returns void

    • Show and hide the minimap.

      Parameters

      • show: boolean

        Set false to hide minimap

      Returns void

    • Parameters

      • searchResults: any

      Returns void

    • Get GeoJSON feature ids of all features identified with a taxon.

      Parameters

      • taxonId: string

        The taxon identifier

      Returns number[]

      GeoJSON identifiers of features on the path

    • Parameters

      • taxonId: string

      Returns string

    • Unselect all features on the map.

      Returns void

    • Select features and zoom the map to them.

      Parameters

      • geojsonIds: number[]

        An array of GeoJSON feature identifiers

      • Optionaloptions: { zoomIn?: boolean }
        • OptionalzoomIn?: boolean

          Zoom in the map (always zoom out as necessary)

      Returns void

    Markers

    • Add dataset markers to the map.

      Parameters

      • datasets: DatasetTerms[]

        An array with an object for each dataset, specifying its identifier and an array of associated anatomical terms

      Returns void

    • Add a marker to the map.

      Parameters

      • anatomicalId: string

        The anatomical identifier of the feature on which to place the marker.

      • options: FlatMapMarkerOptions = {}

        Configurable options for the marker.

      Returns number[]

      The identifiers for the resulting markers. An empty array is returned if the map doesn't contain a feature with the given anatomical identifier

    • Add a list of markers to the map.

      Parameters

      • anatomicalIds: string[]

        Anatomical identifiers of features on which to place markers.

      • options: FlatMapMarkerOptions = {}

        Configurable options for the markers.

      Returns number[]

      The identifiers of the resulting markers. An empty array is returned if the map doesn't contain a feature with the given anatomical identifier

    • Remove all dataset markers from the map.

      Returns void

    • Remove all markers from the map.

      Returns void

    • Remove markers for a dataset from the map.

      Parameters

      • datasetId: string

        A dataset marker identifier as passed to addDatasetMarkers()

      Returns void

    • Remove a marker from the map.

      Parameters

      • markerId: number

        The identifier of the marker, as returned by addMarker()

      Returns void

    • Shows a popup at a marker.

      This method should only be called in response to a mouseenter event passed to the map's callback function otherwise a popup won't be shown.

      Parameters

      • markerId: any

        The identifier of the marker

      • content: any

        The popup's content

      • options: {} = {}

      Returns boolean

      Return true if the popup is shown

      The resulting popup is given a class name of flatmap-tooltip-popup.

    • Return the set of anatomical identifiers of the markers visible in the current map view.

      Returns string[]

      A list of identifiers