Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Map tips provide the user with the ability to quickly retrieve information about entities underneath the mouse cursor.

...

ID

weave.maptips

Properties

...

name

...

description

...

minScale

...

Name

TypeRequiredDefault

Description

minScale

numberno0

The default minimum scale below which no map tips will be shown to the user.

maxScaleThis can be set at the action level, the tip level or not at all, and specifies the

numbernoinfinity

The default maximum scale above which no map tips will be shown to the user.

radiusThis can be set at the action level, the tip level or not at all, and specifies the

numberno3

The default radius, in map units, of the area to be searched, centred on the mouse location.

pressed

booleannofalse

This sets the initial state of the map tip and it is off by defaulttips. Setting it to 'true' will turn on map tip tips at startup. This can only be set at the action level. The default is 'false'.multipleMaximum

multipleMaximum

numberno1

If the search returns more than this many results , the default being 1, then multipleText will be shown to the user instead of the results. If these many or fewer results are available then they're all shown. This can only be set at the action level.

multipleText

stringnoThere are too many features at that location

The text to show to the user if more than multipleMaximum results are available. The default text is 'There are too many features at that location'. This can only be set at the action level.

isDefault

Should be set to 'true' in the tip that should be enabled by default.

tiptip

tipyes

A tip tag must be created for each set of data that's to be made available to the user for display in a map tip. This is only available at the action level.

data

The name of a Data configuration that provides the data for this particular tip. This is only available at the tip level.

datadefinition

The name of a Data Definition configured that provides the data for this particular tip. This is only available at the tip level.

entity

The Entity that the data definition for the tip is associated with. This is only available at the tip level.

label

The label to display for this particular tip. This is only available at the tip level.

autoSizeautoSizebooleannofalsetrue/false indicating if the popup window should try and adjust its size. The default is 'false'.
minSizesizeno105,10The minimum width and height in pixels that the popup window should use when auto-sizing. The default is 105,10.
maxSizesizeno1200,660The maximum width and height in pixels that the popup window should use when auto-sizing. The default is 1200,660.
sizesizeno200,200The default width and height in pixels that the popup windows should use. The default is 200,200.
hideDelaynumberno2000The number of milliseconds to wait before hiding the popup window. The default is 2000.
selectedOnlybooleannofalseRestrict the map tip to the selected features only. The default is 'false'.
selectedOnlyMenubooleannofalseAdd a menu to the map tips tool to allow the user to turn on or off the selectedOnly flag. The default is 'false'.
visibleOnlybooleannofalseRestrict the map tip to display only if the associated layer is turned on in the ToC. The default is 'false'. Only available since 2.5.26
visibleOnlyMenubooleannofalseAdd a menu to the map tips tool to allow the user to turn on or off the visibleOnly flag. The default is 'false'. Only available since 2.5.26
showGeometrybooleannotrueShould the geometry of the related entity be drawn. The default is 'true'. Only available since 2.5.26

Sub-Tags

tip

NameTypeRequiredDescription
minScalenumberno

The minimum scale below which no map tips will be shown to the user.

maxScalenumberno

The maximum scale above which no map tips will be shown to the user.

radiusnumberno

The radius, in map units, of the area to be searched, centred on the mouse location.

isDefaultbooleanno

Should be set to 'true' in the tip that should be enabled by default.

dataDatayes, if datadefinition is not setThe id of a Data configuration that provides the data for this particular tip.
datadefinitionData Definitionyes, if data is not setThe id of a Data Definition configuration that provides the data for this particular tip.
entityEntityyes, if datadefinition is setThe id of the Entity that the Data Definition should generate the data for.
labelstring

yes, if datadefinition is set

no, if data is set

The label to display as this tip in the menu. Will override the label provided by the Data if data is specified rather than datadefinition.
autoSizebooleannoIndicating if the popup window should try and adjust its size
minSizesizenoThe minimum width and height in pixels that the popup window should use when auto-sizing.
maxSizesizenoThe maximum width and height in pixels that the popup window should use when auto-sizing.
sizesizenoThe default width and height in pixels that the popup windows should use
selectedOnlybooleannoRestrict the map tip to the selected features only.
visibleOnlybooleannoRestrict the map tip to display only if the associated layer is turned on in the ToC.
groupstringnoA map tip with a group set will be placed under a sub-menu where the text of the sub-menu item will be taken from the group value, if a group isn't specified then the map tip will appear directly in the menu. Only available since 2.5.26
templatestringnoUsed to apply HTML formatting to the tip for display in the popup.

size

NameTypeRequiredDescription
widthnumberyesThe width of the "size", in pixels
heightnumberyesThe height of the "size' in pixels

Notes

  • If data is set then label isn't required, but will override the label set for the given data if set

    Only one of data or datadefinition should be set.

  • If datadefinition is set then entity and label should also be set.
  • If data is set then entity does not need to be set (and will be ignored).
  • data or datadefinition should be set for a tip, but one of them must be set.

  • The default values for tips are taken from the matching attribute in the parent tag.

Examples

Code Block
xml
xml
linenumberstrue
<item action="weave.maptips">
	<tip>
		<data>property_details</data>
		<isDefault>true</isDefault>
	</tip>
	<tip>
		<data>road_details</data>
	</tip>
</item>

...

Code Block
xml
xml
linenumberstrue
<item action="weave.maptips">
	<pressed>true</pressed>
	<tip>
		<label>Property</label>
		<entity>property</entity>
		<datadefinition>property_details</datadefinition>
		<isDefault>true</isDefault>
		<minScale>1000</minScale>
		<maxScale>10000</maxScale>
	</tip>
	<tip>
		<label>Road<<datadefinition>road_details</label>datadefinition>
		<entity>roads</entity>
		<datadefinition>road_details<<label>Road</datadefinition>label>
		<radius>5</radius>
		<minScale>250</minScale>
		<maxScale>1000</maxScale>
	</tip>
</item>

...