Tooltip Class
Constructor
-
options
Parameters:
-
options
ObjectPasses on options (e.g. html, text, position, map, padding, defaultAnchorType, enabledAnchorTypes, collisionRank) to MapView.Tooltip's options argument.
-
[html]
optionalPass in custom html for your marker, if using this method you must also pass in a selector for your content.
-
[selector]
optionalUsed in conjuction with the html property to select the div for repositioning
-
[contentHtml]
optionalUse mappedin's default tooltip styling with custom inner html content
-
[text]
optionalInstead of passing html pass in plain text to be displayed in the tooltip
-
[position]
#crossLink "MapView/getPositionPolygon:method" optionalshould be something you got from }{{/crossLink}} or {{#crossLink "MapView/getPositionNode:method"}}{{/crossLink}}.
-
[map]
optionalThe map ID where the tooltip should be displayed
-
[defaultAnchorType]
optionalThe default orientation to place the tooltip.
-
[padding]
optionalThe distance in pixel to offset the tooltip from the anchor point.
-
[enabledAnchorTypes]
optionalAn object used to disable certain anchor positions from being used.
-
[collisionRank]
optionalThe rank of the object used when comparing colliders to determine which should be shown.
-
A Tooltip is an html element that attempts to orient itself around an anchor in 3D space. It will always maintain the same size on the screen, but will attempt to change its orientation based on other colliders in the scene.
Make your own and add it directly to the map with createTooltip, or use the constructor and add it when you want.
You will need to specify at least options.position
and one of options.html
and options.selector
OR options.contentHtml
.