Client Views Map

The Map View is used to provide the user with a means of navigating geospatial data using a map.

ID

com.cohga.html.client.main.mapView

Sub-tags

Name

Type

Cardinality

Description

Name

Type

Cardinality

Description

label

String

0..1

Label to display in tab

location

String

1..1

Which region to add the view to

toolbar

toolbar

0..1

Actions and components to show at top of map

scalebar

toolbar

0..1

Actions and components to show at bottom of map

contextmenu

context menu

0..1

The definition for the right click menu

showloading

boolean

0..1

If a progress bar is included in the client setting this value to true should enable the progress bar when requesting map images from Weave.

scales

list of scale

0..1

A list of fixed scales to use for the map. If this value is set then the user will only be able to zoom to these fixed scales.

Only scales or resolutions should be set.

resolutions

list of resolution

0..1

A list of fixed resolutions to use for the map. If this value is set then the user will only be able to zoom to these fixed resolutions.

Only scales or resolutions should be set. If you have the choice choose resolutions because in the end the scales are converted to resolutions and because of the vagaries of JavaScript maths that conversion may not be as accurate as specifying the resolutions directly.

toc

table of contents

0..1

A reference to a toc model to represent the layers in the map.

Generally this value should be set and is really only optional to allow for a quick initial setup for testing purposes as a simple toc model will be generated based on the included  map engines if it is not set.

extents

list of map extents

1..1

Contains the initial, full and limit extents of the map

crs

String

0..1

Coordinate reference system to use for the map

control

map control

0..n

An additional map component to be placed on the map

mapEngine

map engine

1..n

A source for data to display on the map.

Alternatively rather than having one or more mapEngine tags you can have a single mapEngines tag that includes one or more mapEngine tags. This allows you to reference the same group of map engines in multiple clients using a client snippet.

highlight

highlight

0..1

The default style to use to highlight an individual entity (for example when selected in a data grid)

minScale

Number

0..1

The minimum scale to zoom to when the map is zoomed into the boundary of an object.

Useful for example when you may have small object to be zoomed to and you don't want the map scale to be set to 1:20 just to match the bounds of the object. By setting this value the map will zoom to the minScale value instead.

units

String

0..1

The map units that are to be used.

displayCrs

String

0..1

The CRS to use when displaying coordinates to the user, defaults to the same value as crs.

Scales

A list of scales can be added to the map which will prevent the user from zooming to arbitrary scales, that it they'll be limited to the values provided by this list.

The list is provided in the map view as a list of <scale> values within the <scales>

<scales> <scale>1000</scale> <scale>2000</scale> <scale>5000</scale> <scale>10000</scale> <scale>20000</scale> <scale>50000</scale> <scale>100000</scale> <scale>200000</scale> <scale>500000</scale> </scales>

or as a comma-separated list of values within the <scales>

<scales>1000,2000,5000,10000,20000,50000,100000,200000,500000</scales>

Table of Contents

A map view may be associated with a Table Of Contents model to provide the user with a more user-friendly listing of the layers available in the map.

If no table of contents is linked explicitly with the map then Weave will create a generic one providing the user with a simple list of the available layers.

<toc ref="toc.vectors"/>

Extents

The administrator can set the initial extent (used when the client starts and when the user uses the ‘home extent' button), full extent (used when the user uses the 'full extent' button) and limit extent (used to restrict the users movement).

Note that these values can also be set in the defaults section of the client config, but the values set in the map view take precedence.

Coordinate Reference System

You can specify a default coordinate reference system that you wish to be used for the map. Obviously, it should be one that is supported by the map engine, and preferably (for performance reasons) the default for the map engine.

The default if not set will be EPSG:4326.

Map Controls

Keyboard

com.cohga.client.mapctrl.keyboard

Adds keyboard control to the map panel (when the map has focus) allowing the user to pan and zoom the map using the keyboard

Mouse wheel

com.cohga.client.mapctrl.navigation

Adds mouse wheel control to the map panel (when the map has focus) allowing the user to zoom in and out of the map using the mouse wheel

Scale Line

com.cohga.client.mapctrl.scaleLine

Display the current scale on the map as a line

Display the current scale on the map as a line

Scale

com.cohga.client.mapctrl.scale

Display the current scale on the map as text

Scale Bar

weave.mapctrl.scalebar

Display the current scale or scale text, or both on the map

Mouse Position

com.cohga.client.mapctrl.mousePosition

Display the current cursor position on the map

additional properties

name

default

description

name

default

description

numDigits

5

</