Skip to content

FlatmapVuer

A vue component of the flatmap viewer.

Props

NameDescriptionTypeRequiredDefault
entryThe taxon identifier of the species represented by the map.stringtrue-
uuidThe unique uuid of the flatmap. If given then this exact map will be loaded, overriding taxon and biologicalSex.stringfalse-
biologicalSexThe biological sex of the species represented by the map. This is specified as metadata in the map's source file.stringfalse''
minZoomThe minimum zoom level of the map.numberfalse1
tooltipsThe option to add another feature label (FeatureSmallSymbolLayer) when this tooltips is set to false.booleanfalsetrue
helpModeThe option to show tooltips for help mode.booleanfalsefalse
helpModeActiveItemThe active item index of help mode.numberfalse0
helpModeDialogThe option to use helpModeDialog. On default, false, clicking help will show all tooltips. If true, clicking help will show the help-mode-dialog.booleanfalsefalse
helpModeLastItemThe last item of help mode.booleanfalsefalse
helpModeInitialIndexThe initial index number for help mode tooltips. Set negative (e.g. -2) if there are other tooltips outside of hoverVisibilities.numberfalse0
renderAtMountedThe option to create map on component mounted.booleanfalsetrue
displayMinimapThe option to display minimap at the top-right corner of the map.booleanfalsefalse
displayWarningThe option to show warning. Example for legacy or beta maps.booleanfalsefalse
enableOpenMapUIFlag to determine rather open map UI should be presented or not.booleanfalsefalse
openMapOptionsThe data to show different map options. Available at the bottom-left corner ("Open new map" tooltip).arrayfalse[ { display: 'Open AC Map', key: 'AC', }, { display: 'Open FC Map', key: 'FC', }, { display: 'Open 3D Human Map', key: '3D', }, ]
showStarInLegendThe option to show star in legend area.booleanfalsefalse
isLegacyFlag to determine whether this is legacy map or not. displayWarning should be shown for legacy map.booleanfalsefalse
displayLatestChangesThe option to show the latest changes.booleanfalsefalse
stateState containing state of the flatmap.objectfalseundefined
flatmapAPISpecify the endpoint of the flatmap server.stringfalse'https://mapcore-demo.org/current/flatmap/v3/'
sparcAPISpecify the endpoint of the SPARC API.stringfalse'https://api.sparc.science/'
disableUIFlag to disable UIs on Mapbooleanfalsefalse
connectivityInfoSidebarThe option to show connectivity information in sidebarbooleanfalsefalse
annotationSidebarThe option to show annotation in sidebarbooleanfalsefalse

Events

Event NameDescriptionParameters
open-mapThis event is emitted when the user chooses a different map option from openMapOptions props.mapOption.key
annotation-close--
view-latest-mapThe event emitted by viewLatestMap method.-
pathway-selection-changed--
resource-selected--
pan-zoom-callback--
connectivity-info-closeThis event is emitted when a connectivity info (provenance popup) is closed.-
help-mode-last-itemThis event is emitted when the tooltips in help mode reach the last item.-
shown-tooltipThis event is emitted after a tooltip in Flatmap is shown.-
connectivity-info-open--
annotation-open--
shown-map-tooltipThis event is emitted after a tooltip on Flatmap's map is shown.-
readyThis is onFlatmapReady event.this (Component Vue Instance)

Methods

MethodDescriptionParameters
initialiseDrawingFunction to initialise drawing.-
cancelDrawnFeatureFunction to cancel a newly drawn feature.-
connectedFeatureTooltipFunction to display connected features' tooltip for drawn connectivity.id
confirmDrawnFeatureFunction to confirm a newly drawn feature.-
toolbarEventFunction to process the annotation toolbar click events.type name
annotationDrawModeEventFunction to fire annotation event based on the provided data. Either edit or delete action.data
changeAnnotationDrawModeFunction to update the annotation draw mode.mode
clearAnnotationFeatureFunction to remove all drawn annotations from flatmap annotation layer.-
modifyAnnotationFeatureFunction to fire the trash action. See https://github.com/mapbox/mapbox-gl-draw/blob/main/docs/API.md#trash-draw for more details.-
rollbackAnnotationEventFunction to rollback the failure drawn from flatmap annotation layer.-
commitAnnotationEventFunction to commit the emitted annotation data from successful new drawn to flatmap annotation layer.annotation
fetchAnnotatedItemIdsFunction to fetch annotated item id.userId, participated
setFeatureAnnotatedFunction to add existing drawn annotations to flatmap.-
fetchDrawnFeaturesFunction to fetch drawn features.userId, participated
addAnnotationFeatureFunction to draw existing drawn annotations based on selector.-
showAnnotatorFunction to display annotator toolbar.flag
setDrawnTypeFunction to switch the type of annotation.flag
setAnnotatedTypeFunction to switch the type of person who annotated.flag
setFlightPath3DFunction to switch from 2D to 3Dflag
viewLatestMapFunction to view the latest map (example when you are on legacy map).-
backgroundChangeCallbackFunction to change the background colour of the map by providing the colour.colour
processSystemsFunction to process a list of a FC flatmap's systems.systems
processTaxonFunction to add taxon identifiers into the taxon connectivity array, by retrieving their corresponding labels using the flatmap API.flatmapAPI, taxonIdentifiers
toggleDrawerFunction to show or hide the display of the bottom-left drawer container.-
setColourFunction to toggle colour/greyscale of organs. The parameter flag is a boolean, true (colour) and false (greyscale).flag
setOutlinesFunction to toggle outlines f organs. The parameter flag is a boolean, true to show outlines, false to hide outlines.flag
resetViewFunction to toggle paths to default. Also called when the associated button is pressed.-
zoomInFunction to zoom in. Also called when the associated button is pressed.-
zoomOutFunction to zoom out. Also called when the associated button is pressed.-
highlightConnectedPathsFunction to highlight the connected paths by providing path model identifier, pathId.pathId
alertMouseEnterEmittedFunction to enable/disable mouse enter and leave event for alert checkboxpayload
alertSelectedFunction to enable/disable (show/hide) pathways with/without alert by providing kay, value payload object {alertKey, true/false}.payload
checkAllAlertsFunction to enable/disable (show/hide) all alerts option by providing flag (true/false).flag
systemSelectedFunction to enable/disable (show/hide) the system by providing kay, value payload object {systemId, true/false}.payload
checkAllSystemsFunction to enable/disable (show/hide) all systems by providing flag (true/false).flag
ftuSelectedFunction to display features with annotation matching the provided term.models
layersSelectedFunction to show or hide the layer by providing {layerId, true/false} in payload.payload
checkAllLayersFunction to show or hide all layers by providing payload with payload.keys array and payload.value flag.payload
taxonsSelectedFunction to show or hide connectivity features studied in particular species by providing {taxonId, true/false} in payload.key, payload.value.payload
checkAllTaxonsFunction to show or hide connectivity features studied in particular species by providing payload with payload.keys array and payload.value flag.payload
pathwaysSelectedFunction to hide or show paths of a given type by providing {pathType, true/false} in payload.key, payload.value.payload
checkAllPathwaysFunction to hide or show paths of a given type by providing payload with payload.keys array and payload.value flag.payload
enablePanZoomEventsFunction to generate callbacks as a result of panning/zooming the map. flag (boolean) - generate callbacks when true, otherwise disable them.flag
annotationEventCallbackFunction to process annotation callbacks, invoked when events occur with the map.payload, data
eventCallbackA callback function, invoked when events occur with the map. The first parameter gives the type of event, the second provides details about the event. (This is the callback function from MapManager.loadMap()).-
changeViewingModeFunction triggered by viewing mode change. (e.g., from 'Exploration' to 'Annotation') All tooltips and popups currently showing on map will be closedmodeName
checkAndCreatePopupsFunction to create/display tooltips from the provided data. checkNeuronClicked shows a neuron path pop up if a path was recently clicked.data
closeTooltipFunction to close tooltip.-
createTooltipFromNeuronCurationFunction to create tooltip from Neuron Curation data.data
showPopupFunction to show popup on map.featureId, node, options
showMarkerPopupFunction to show marker popup.featureId, node, options
closeMinimapFunction to close minimap.-
setHelpModeFunction to set help mode by providing flag helpMode (true/false).helpMode
showTooltipFunction to show tooltip by providing tooltipNumber.tooltipNumber timeout (default: 500)
hideTooltipFunction to hide tooltip by providing tooltipNumber.tooltipNumber timeout (default: 500)
displayTooltipFunction to display tooltip by providing featureId (feature).feature geometry (default: undefined)
openFlatmapHelpPopupFunction to open Flatmap Help Popup.-
closeFlatmapHelpPopupFunction to close Flatmap Help Popup.-
getLabelsFunction to get annotation labels.-
getStateFunction to get the state (object) of the map.-
setStateFunction to set state (object) for the map.state
restoreMapStateFunction to restore map's state from the state provided.state
setFlightPathInfoFunction to show flight path option (3D option) based on the map version (currently 1.6 and above).mapVersion
createFlatmapFunction to create Flatmap by providing the state.state
computePathControlsMaximumHeightFunction to compute path controls maximum height.-
mapResizeFunction to resize the map.-
onFlatmapReadyThis function is used for functions that need to run immediately after the flatmap is loaded.state
handleMapClickFunction to handle mouse click on map area after the map is loaded.-
showMinimapFunction to show or hide the minimap by providing flag (boolean) value.flag
showPathwaysDrawerFunction to show or hide the pathways drawer by providing flag (boolean) value.flag
searchAndShowResultFunction to display features with annotation matching the provided term, with the option to display the label using displayLabel flag.term, displayLabel
searchSuggestionsFunction to show search suggestions from the term provided.term