API calls to place amd remove different types of markers on a flatmap
The anatomical identifiers of features in the map.
The biological sex identifier of the species described by the map.
The flatmap's bounds.
The map's creation time.
Datasets associated with the map.
The map's index.json
as returned from the map server.
Does the flatmap contain flightpath information?
boolean
The map's id as specified at generation time.
The map's mapMetadata as returned from the map server.
The taxon identifier of the species described by the map.
The taxon identifiers of species which the map's connectivity has been observed in.
A unique identifier for the map within the viewer.
The map's URL on the map server.
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.
Add a drawn feature to the annotation drawing tool.
{AnnotatedFeature} The feature to add
Display an image on a given anatomical feature.
The anatomical identifier of the feature on which to place the image. The image is scaled to fit within the feature's bounding box.
The URL of the image to display.
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
.
Get a feature's annotations given its GeoJSON id.
The features's GeoJSON identifier
The feature's annotations
Get a feature's annotations given its external id.
The features's external identifier
The feature's annotations
Generate an annotation
callback event when a drawn annotation has been created
a modified.
{string} Either created
, updated
or deleted
{AnnotatedFeature} A feature object with id
, type
, and geometry
fields of a feature that has been created, updated or
deleted.
Clear all drawn annotations from current annotation layer.
Clear any visibility filter on features and paths.
Mark a drawn/changed annotation as having been accepted by the user.
{AnnotationEvent} The object as received in an annotation callback
Generate a callback as a result of some event in a control.
The event type
The name of the control
The value of the control
Show or hide connectivity features observed in particular species.
A single taxon identifier or an array of identifiers.
Show or hide connectivity paths and features.
Defaults to true
(show)
Enable or disable reset selected features when click on an empty area.
Whether to enable the reset behavior.
When enabled, click on empty space will reset the view.
Defaults to true
(enable)
Show/hide flight path view.
Optional
enable: boolean = trueThe layer identifier to enable
Show or hide the layer. Defaults to true
(show)
Enable/disable the neuron paths associated with a nerve centreline.
Anatomical identifiers of nerve centrelines
Optional
enable: boolean = trueGenerate callbacks as a result of panning/zooming the map.
Generate callbacks when true
,
otherwise disable them.
Hide or show paths of a given type.
Show or hide paths of that type. Defaults to
true
(show)
Hide or show all paths valid in SCKAN.
Either valid
or invalid
Show or hide paths with that SCKAN state.
Defaults to true
(show)
The identifier of the system to enable
Show or hide the system. Defaults to true
(show)
Generate a callback as a result of some event with a flatmap feature.
The event type
Properties associated with the feature
Get valid keys and their value ranges to use when filtering feature and path visibility.
Value ranges are string arrays
Return properties associated with a feature.
The feature's internal (GeoJSON) id
Properties associated with the feature
Get the map's current background colour.
The background colour.
Get the map's current background opacity.
The background opacity.
Get a details of the nerve centrelines in the map.
Get all paths associated with a set of features.
GeoJSON ids of features
A Promise resolving to an array of path identifiers
Get the map's zoom settings.
The map's minimum, current, and maximum zoom levels.
Generate a callback as a result of some event with a marker.
The event type
The marker's GeoJSON identifier
Properties associated with the marker
Get model terms of all paths connected to a node.
The local (GeoJSON) identifier of a node
Model terms of all paths connected to the node
Generate a callback as a result of panning/zooming the map.
The event type, pan
or zoom
.
Pan/zoom the map to a new view
The map's normalised top-left corner
The map's normalised size
Get GeoJSON feature ids of all nodes of a path model.
The path's model identifier
GeoJSON identifiers of features on the path
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.
The URI of an entity.
JSON describing the entity.
Get labels for entities from the flatmap's server's knowledge store.
Anatomical identifiers of entities.
Get all paths associated with a set of features.
Anatomical terms of features
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.
{Object} The drawn feature to refresh.
The feature with currently geometry or null
if the feature has been deleted.
Delete the selected drawn feature
Remove images for an anatomical features.
An image identifier previously returned by addImage()
.
Remove the currently active popup from the map.
Reset a map to its initial state.
Mark a drawn/changed annotation as having been rejected by the user.
{AnnotationEvent} The object as received in an annotation callback
Find features with labels or terms matching text
.
The text to search
Optional
auto: boolean = falseIf true
return suggestions of text to search for.
Either a Searchresults
object with fields of featureIds
and results
,
where results
has featureId
, score
, terms
and text
fields,
or a Suggestion
object containing suggested matches
(see https://lucaong.github.io/minisearch/types/MiniSearch.Suggestion.html).
Select features on the map.
An array of anaotomical terms identifing features to select
Select features on the map.
A single GeoJSON feature identifiers or an array of identifiers.
Sets the map's background colour.
The colour
Sets the map's background opacity.
The opacity
Flag the feature as having external annotation.
The feature's external identifier
Sets a visibility filter for features and paths
Optional
filterExpression: PropertiesFilterExpression = trueThe filter specification
Show or hide a tool for drawing regions to annotate on the map.
Optional
visible: boolean = trueShow and hide the minimap.
Set false to hide minimap
Get GeoJSON feature ids of all features identified with a taxon.
The taxon identifier
GeoJSON identifiers of features on the path
Unselect all features on the map.
Zoom the map in.
Zoom the map out.
Select features and zoom the map to them.
Optional
options: FeatureZoomOptions = {}Optional
zoomIn?: booleanSelect features and zoom the map to them.
An array of GeoJSON feature identifiers
Optional
options: { zoomIn?: boolean }Optional
zoomIn?: booleanZoom in the map (always zoom out as necessary)
Add dataset markers to the map.
An array with an object for each dataset, specifying its identifier and an array of associated anatomical terms
Add a marker to the map.
The anatomical identifier of the feature on which to place the marker.
Configurable options for the marker.
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.
Anatomical identifiers of features on which to place markers.
Configurable options for the markers.
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.
Remove all markers from the map.
Remove markers for a dataset from the map.
A dataset marker identifier as passed
to addDatasetMarkers()
Remove a marker from the map.
The identifier of the marker, as returned
by addMarker()
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.
The identifier of the marker
The popup's content
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.
A list of identifiers
Maps are not created directly but instead are created and loaded by
LoadMap
of MapViewer.