Versions Compared

Key

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

...

There are other flags that can be added to the item to alter the way the index combo works:

Name

Type

Default

Description

width

string


Sets the width of the input box. This should be a standard HTML width setting, for example "100%" would fill the whole toolbar, "250px" would be 250 pixels wide.

minScale

number


When the user chooses an result from the list the map will be zoomed to the extent of the chosen entity, this setting ensures that the map won't be zoomed in beyond the given scale.

pageSize

number


This value changes the number of items that will be presented to the user as the results of the search, for example "8" will tell the client to display the top 8 results for the search.

doSelect

boolean

true

The Weave client can be instructed to not update the current selection when the user chooses a result from the list. This allows the index input box to be used as a simple "find" tool without actually interacting with the active selection. A setting of true will alter the current selection.

clearOthers

boolean


If doSelect is set not to false then when this flag is set to true it tells the Weave client that it should clear the selection for every other entity when the user chooses a result. If it is set to false (or not set) then the client won't clear the selection for the other entities.

doMarker

boolean

true

If set to true, this flag tells the client to display a marker at the centre of the chosen entity. If set to false then the client will not display a marker.

doGeometry

boolean

false

If set to false, this flag tells the client not to display the geometry of the selected feature that the user chooses. If true then the Weave client will display the geometry of the entity chosen. This is useful if the drawing of selections is disabled in the ToC, otherwise the geometry will be drawn twice.

doMarkers

boolean

true

If set to true, this flag tells the client to display a marker for each item in the list once it completes the search, but before the user chooses a particular entity. If set to false then no markers will be displayed (until the user chooses a particular entity if doMarker is set to true).

doShowIcons

boolean

false

Display icons next to the search results.

doTurnOnLayer

boolean

false

Should the layer associated with the entity via the ToC model be turned on when a result is selected? Available from release 2.5.26.

doZoom

boolean

true

Set to false if you do not want the map to zoom to the selected entity

type

'wildcard', 'fuzzy' or 'exact'

wildcard

Change the type of search that's performed. Setting 'exact' performs the search using the search term, 'wildcard' appends an * to the end of the search term and 'fuzzy' appends a ~ to the end of the search term.

all

boolean

false

If set to true, all indexes will be searched rather than just the indexes associated with the active entity. This does not apply if the index attribute below is set.

index

string


A comma separated list of index names that should be searched. When this value is set only the indexes listed will be searched, and the all attribute above is ignored.

Note, this can also be a list of entities, rather than indexes, in which case all indexes associated with the listed entities will be searched.

highlight

boolean

false

Should the results list highlight the part of the text that was matched in the search?

emptyText

string

Quick search

The text to show in the field when nothing has been entered. i18n resource name is indexcombo.emptyText.

loadingText

string

Searching...

The text to show in the field when the content is being loaded. i18n resource name is indexcombo.loading.

autoFocus

boolean

true

Should the index field get focus when the client starts up?

Beyond these settings, it is also possible to change the stroke and fill of the geometry (if doGeometry is true) by adding a geometryStyle tag to the configuration. The geometryStyle tag can set the fill and/or stroke used to draw the entity geometry when it is drawn on the client, but it will not change the style when drawing the selection.

...