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.

...

name

description

minScale

This can be set at the action level, the tip level or not at all, and specifies the minimum scale below which no map tips will be shown to the user.

maxScale

This can be set at the action level, the tip level or not at all, and specifies the maximum scale above which no map tips will be shown to the user.

radius

This can be set at the action level, the tip level or not at all, and specifies the radius, in map units, of the area to be searched, centred on the mouse location.

pressed

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

multipleMaximum

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

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.

tip

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.

autoSizetrue/false indicating if the popup window should try and adjust its size. The default is 'false'.
minSizeThe minimum width and height in pixels that the popup window should use when auto-sizing. The default is 105,10.
maxSizeThe maximum width and height in pixels that the popup window should use when auto-sizing. The default is 1200,660.
sizeThe default width and height in pixels that the popup windows should use. The default is 200,200.
hideDelayThe number of milliseconds to wait before hiding the popup window. The default is 2000.
selectedOnlyRestrict the map tip to the selected features only. The default is 'false'.
selectedOnlyMenuAdd a menu to the map tips tool to allow the user to turn on or off the selectedOnly flag. The default is 'false'.
visibleOnlyRestrict 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
visibleOnlyMenuAdd 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
showGeometryShould the geometry of the related entity be drawn. The default is 'true'. Only available since 2.5.26
groupA 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
templateUsed to apply HTML formatting to the tip for display in the popup.

Notes

  • 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).
  • If data is set then label isn't required, but will override the label set for the given data if set.

...

Code Block
languagexml
titleAdjusting the size of the popup
<item action="weave.maptips">
	<autoSize>true</autoSize>
	<minSize width="100" height="100"/>
	<maxSize width="200" height="400"/>
	<size width="150" height="150"/>
	<tips>
		<tip label="Property" entity="property" datadefinition="property_details" isDefault="true"/>
		<tip label="Image" entity="property" datadefinition="property_images">
			<maxSize width="800" height="800"/>
		</tip>
	</tips>
</item>


Code Block
titleFormatting the text in the popup
<item action="weave.maptips">
	<tip>
		<data>property_details</data>
		<template><![CDATA[<div><h1><i>ADDRESS DETAILS:</i></h1>{address_num} {street_name} {street_type}<br>{suburb}</div>]]></template>
	</tip>
</item>


Code Block
languagexml
titleMap tips with groups
<item action="weave.maptips">
	<tip>
		<data>property_details</data>
		<isDefault>true</isDefault>
		<group>Property</group>
	</tip>
	<tip>
		<data>property_summary</data>
		<group>Property</group>
	</tip>
	<tip>
		<data>property_owner</data>
		<group>Property</group>
	</tip>
	<tip>
		<data>road_details</data>
	</tip>
	<tip>
		<data>serwer_details</data>
		<group>Sewer</group>
	</tip>
	<tip>
		<data>sewer_summary</data>
		<group>Sewer</group>
	</tip>
</item>

...