Maptips Class
Maptips class.
The map tip module provides functions to create a small popup window as the mouse hovers over a feature on the map (point, polygon, line, etc.). NOTE: This module uses global config object. featureLayers->mapTipSettings
Item Index
Methods
Methods
_getSymbolConfig
-
layerUrl
-
wmsName
Gets the defined symbology from a layer's web service
Parameters:
Returns:
The defined symbology from the layer definition
checkMaptipPosition
-
target
-
graphic
Checks if the maptip is hidden by the sub-panel and publishes a center-at event to pan the map, moving maptip into view.
Parameters:
-
target
JObjecta node to which the tooltip will be attached
-
graphic
Object[description]
getLayerConfig
-
url
-
wmsName
Returns the feature layer config for the given url
getMaptipContent
-
graphic
-
interactive
Generates content for a maptip.
getSubPanelLeftOffset
()
Number
private
Returns the position of the sub-panel relative to the leftmost edge of the screen.
Returns:
position of hte sub-panel relative to the leftmost edge of the screen
getSymbolForFeature
-
feature
Given a feature object or a graphic object (or any object that has a getLayer method and an attributes field) return the object containing the image URL and legend text for that feature/graphic object.
Parameters:
-
feature
Object
Returns:
The default icon used to represent the feature layer
getSymbolForLayer
-
layer
-
wmsName
Gets the default symbology icon from a layer's web service
Parameters:
Returns:
The default icon from the layer's symbology
getToolTipOffset
()
Number
private
Returns the position of the maptip relative to the leftmost edge of the screen.
Returns:
the position of the maptip relative to the leftmost edge of the screen
init
()
Calls the event handling initialization function
initListeners
()
private
Initialize event listeners for the maptip events
loadStrings
()
Updates some of the Strings on the HTML page using the config string resources
Events
maptips.EXTENT_CHANGE [subscribed]
maptips.REPOSITION_INTERACTIVE [subscribed]
Repositions the interactive tooltip that is already displayed when the user pans or zooms the map, or the map is otherwise adjusted. If the tooltip is hidden from the view by the SubPanel or the edge of the map container, it is hidden from the page.
Event Payload:
-
offset
NumberNew tooltip offset relative to the shape it's attached too; when zooming, the shape changes its size and the offset needs to be recalculated to keep the tooltip in relative center
maptips.SHOW [subscribed]
Displays a simple, temporary maptip, positioning it over the target
jObject; the content of the maptip is build from the
contents of the graphic
object and the mapTip template specified in the config object.
Event Payload:
-
target
JObjecta node/svg object the user hovered over
-
graphic
ObjectESRI graphic object belonging to the target
maptips.SHOW_INTERACTIVE [subscribed]
Displays an permanent, interactive maptip with a close button, positioning it over the target
jObject; the content of the maptip is build from the
contents of the graphic
object and the mapTip template specified in the config object.
The maptip will not be shown if it's covered by the open SubPanel.
Event Payload:
-
target
JObjecta node/svg object the user hovered over
-
graphic
ObjectESRI graphic object belonging to the target