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.

They use data definitions to supply the data, meaning that the data available to the user can come from any provider, not just the attributes attached to the underlying spatial feature.

The map tip tool can query any entity and is not dependent upon the active entity. The user chooses from the map tip menu what data they're interested in and when they move the mouse around the map that's what the data they 'll will be presented withshown.

ID

weave.maptips

Properties

...

name

...

Name

Type

Required

Default

Description

minScale

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

number

no

0

The default 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

number

no

infinity

The default 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

number

no

3

The default radius, in map units, of the area to be searched

based

, centred on the mouse location.

pressed

boolean

no

false

This sets the initial state of the map

tip and is off by default

tips. Setting it to

turn

'true' will turn on map

tip

tips at startup

. This can only be set at the action level

.

multipleMaximum

number

no

1

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

this

these many or

less

fewer results are available then they're all shown.

This can only be set at the action level.

multipleText

string

no

There are too many features at that location

The text to show to the user if more than multipleMaximum results are available

. The default 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

tip

tip

yes


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.

Only available at the action level.

data

The name of a Data configured

autoSize

boolean

no

false

true/false indicating if the popup window should try and adjust its size.

minSize

size

no

105,10

The minimum width and height in pixels that the popup window should use when auto-sizing.

maxSize

size

no

1200,660

The maximum width and height in pixels that the popup window should use when auto-sizing.

size

size

no

200,200

The default width and height in pixels that the popup windows should use.

hideDelay

number

no

2000

The number of milliseconds to wait before hiding the popup window.

selectedOnly

boolean

no

false

Restrict the map tip to the selected features only.

selectedOnlyMenu

boolean

no

false

Add a menu to the map tips tool to allow the user to turn on or off the selectedOnly flag.

visibleOnly

boolean

no

false

Restrict the map tip to display only if the associated layer is turned on in the ToC. Only available since 2.5.26

visibleOnlyMenu

boolean

no

false

Add a menu to the map tips tool to allow the user to turn on or off the visibleOnly flag. Only available since 2.5.26

showGeometry

boolean

no

true

Should the geometry of the related entity be drawn. Only available since 2.5.26

Sub-Tags

tip

Name

Type

Required

Description

minScale

number

no

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

maxScale

number

no

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

radius

number

no

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

isDefault

boolean

no

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

data

Data

yes, if datadefinition is not set

The id of a Data configuration that provides the data for this particular tip.

Only available at the tip level.

datadefinition

Data Definition

The name

yes, if data is not set

The id of a Data Definition

configured

 configuration that provides the data for this particular tip.

Only available at the tip level.

entity

Entity

yes, if datadefinition is set

The id of the Entity that the Data Definition should generate the

datadefinition

data for

the tip is associated with

.

Only available at the tip level.

label

string

yes, if datadefinition is set

no, if data is set

The label to display

for

as this

particular

tip

. Only available at the tip level

in the menu. Will override the label provided by the Data if data is specified rather than datadefinition.

autoSize

true/false indicating

boolean

no

Indicating if the popup window should try and adjust

it's

its size

.

minSize

size

no

The minimum width and height in pixels that the popup window should use when auto-sizing.

maxSize

size

no

The maximum width and height in pixels that the popup window should use when auto-sizing.

size

size

no

The default width and height in pixels that the popup windows should use

selectedOnly

boolean

no

Restrict the map tip to the selected features only.

Notes

  • Only one of data or datadefinition should be set
  • If datadefintion 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

Examples

...

visibleOnly

boolean

no

Restrict the map tip to display only if the associated layer is turned on in the ToC.

group

string

no

A 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

template

string

no

Used to apply HTML formatting to the tip for display in the popup.

size

Name

Type

Required

Description

width

number

yes

The width of the "size", in pixels

height

number

yes

The height of the "size' in pixels

Notes

  • Only one of 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
languagexml
<item action="weave.maptips">
		<tip>
			<data>property_details</data>
			<isDefault>true</isDefault>
		</tip>
		<tip>
			<data>road_details</data>
		</tip>
	</item>


Code Block
xml
languagexml
linenumberstrue
	<item action="weave.maptips">
		<multipleMaximum>2</multipleMaximum>
		<multipleText>Too many features</multipleText>
		<minScale>1000</minScale>
		<maxScale>50000</maxScale>
		<radius>3</radius>
		<tip>
			<data>property_details</data>
			<isDefault>true</isDefault>
		</tip>
		<tip>
			<data>road_details</data>
		</tip>
	</item>


Code Block
xml
languagexml
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>
Code Block
languagexml
title


Adjusting the size of the popup
Code Block
languagexml
<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>


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


Map tips with groups
Code Block
languagexml
<item action="weave.maptips">
	<tip>
		<data>property_details</data>
		<isDefault>true</isDefault>
		<group>Property</group>
		<minScale>1000</minScale></tip>
	<tip>
		<data>property_summary</data>
		<maxScale>10000<<group>Property</maxScale>group>
	</tip>
	<tip>
		<label>Road<<data>property_owner</label>data>
		<entity>roads</entity><group>Property</group>
	</tip>
	<tip>
		<datadefinition>road<data>road_details</datadefinition>data>
		<radius>5</radius></tip>
	<tip>
		<minScale>250<<data>serwer_details</minScale>data>
		<maxScale>1000<<group>Sewer</maxScale>group>
	</tip>
	<maxSize width="400" height="400"/><tip>
		<data>sewer_summary</data>
		<group>Sewer</group>
	</tip>
</item>

The above example will result in a menu like the following

  •  Property

    • Property Details

    • Property Summary

    • Property Owner

  • Road Details

  • Sewer

    • Sewer Details

    • Sewer Summary