HSLayers.Control.Query (class)

HSLayers.Control.Query

class HSLayers.Control.Query()

Query WMS and MapServer layer types

Example usage:

var infoButton = new HSLayers.Control.Query({horizontal:false,
                                                 container:app.infoPanel});
infoButton.onInfo = function() {
            app.tabs.items.items[1].items.items[1].activate(app.infoPanel);
};
app.panel.addControls([infoButton]);

Properties

If not set, default is new Ext.window

for vector features

HSLayers.Control.Query.CLASS_NAME
Type :String (static)

HSLayers.Control.Query

HSLayers.Control.Query.container
Type :DOMElement (static)

HSLayers.Control.Query

Surrounding DOM element If not set, default is new Ext.window

HSLayers.Control.Query.createLayerResponseContainer
Type :Ext.Container (static)

HSLayers.Control.Query

creates Ext.Container with reserved place for given layer response

HSLayers.Control.Query.createTable

HSLayers.Control.Query

Create Ext.Table and append it as result of the query to main div.

HSLayers.Control.Query.createTableVector

HSLayers.Control.Query

Create Ext.Table and append it as result of the query to main div - for vector features

HSLayers.Control.Query.defaultHandlerOptions
Type :Object (static)

HSLayers.Control.Query

options for the BoundingBox handler

HSLayers.Control.Query.displayClass
Type :String (static)

HSLayers.Control.Query

HSLayers.Control.Query.EVENT_TYPES
Type :String[] (static)

HSLayers.Control.Query

HSLayers.Control.Query.featureCount
Type :Integer (static)

HSLayers.Control.Query

Maximum number of features in response

Default Value:
10
HSLayers.Control.Query.getLayerResponseContainer
Type :Ext.Container (static)

HSLayers.Control.Query

returns Ext.Container with reserved place for given layer response

HSLayers.Control.Query.getWMSQueryURL
Type :Ext.Container (static)

HSLayers.Control.Query

creates query url for WMS layers

HSLayers.Control.Query.handlerClass

HSLayers.Control.Query

mainPanel title

HSLayers.Control.Query.horizontal
Type :Boolean (static)

HSLayers.Control.Query

Should the result table have horizontal orientation?

Default Value:
false
HSLayers.Control.Query.mainPanel
Type :<a href=”http://www.extjs.com/deploy/dev/docs/?class=Ext.Panel“>Ext.Panel</a> (static)

HSLayers.Control.Query

main panel, where the results will be displayed

HSLayers.Control.Query.popup
Type :<a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Popup-js.html“>OpenLayers.Popup</a> (static)

HSLayers.Control.Query

HSLayers.Control.Query.PopupOptions

HSLayers.Control.Query

default popup options

HSLayers.Control.Query.popupOptions

HSLayers.Control.Query

configuration for <a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Popup-js.html“>OpenLayers.Popup</a>

HSLayers.Control.Query.qlayers
Type :<a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Layer-js.html“>OpenLayers.Layer</a>[] (static)

HSLayers.Control.Query

HSLayers.Control.Query.scope
Type :Object (static)

HSLayers.Control.Query

scope for this onInfo

HSLayers.Control.Query.stack
Type :array (static)

HSLayers.Control.Query

Layers Stack

HSLayers.Control.Query.title

HSLayers.Control.Query

mainPanel title

HSLayers.Control.Query.toPopup
Type :Boolean (static)

HSLayers.Control.Query

Result to popup

HSLayers.Control.Query.useIframe
Type :Boolean (static)

HSLayers.Control.Query

should be used iframe for text response?

Methods

MapServer are supported.

useIframe set to True, create iframe.

handler

it should return text, which will be appended in the info panel

HSLayers.Control.Query.createExtMainPanel()

creates this.mainPanel from Ext

HSLayers.Control.Query.setMap(map)

:param <a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html“>OpenLayers.Map</a> map:

HSLayers.Control.Query.activate()
HSLayers.Control.Query.deactivate()
HSLayers.Control.Query.onBoxDrawed(evt)

Called when the box is drawed. Box is cleared...

Arguments:
  • evt (Event) –
HSLayers.Control.Query.onBoxDrawedExt(evt)

Called when the box is drawed. Box is cleared... - Ext available

Arguments:
  • evt (Event) –
HSLayers.Control.Query.queryLayers(evt)
Query each visible layer within the map. Currently, only WMS and

MapServer are supported.

param Event evt:
 if Box only MapServer is requested, if Point, all

supported layer types are requested

HSLayers.Control.Query.request(url, parser)

Call the particula getfeatureinfo service for the layer

Arguments:
  • url (String) – url
  • parser (Function) – method, which will parse the resulting response

:param <a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Layer.WMS-js.html“>OpenLayers.Layer.WMS</a>|<a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Layer/MapServer-js.html“>OpenLayers.Layer.MapServer</a> :

HSLayers.Control.Query.buildWMSQueryParams(layer, xy)

Return WMS query url with request type “GetFeatureInfo” back

:param <a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Layer-js.html“>OpenLayers.Layer</a> layer:

:param <a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Pixel-js.html“>OpenLayers.Pixel</a> xy:

point
Returns:parameters
Return type:Object
HSLayers.Control.Query.buildMapServerQueryUrl(layer, evt)

Return MapServer query url with mode type “nquery” back

:param <a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Layer-js.html“>OpenLayers.Layer</a> layer:

:param <a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Bounds-js.html“>OpenLayers.Bounds</a>|<a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Pixel-js.html“>OpenLayers.Pixel</a> evt:

Returns:url
Return type:String
HSLayers.Control.Query.parseText(response, layer)

Text response parser. Append text to the div directly.

Arguments:
  • response (String) –
  • layer (OpenLayers.Layer) –
HSLayers.Control.Query.parseHTML(text, layer)
HTML response parser. Append text to the div directly. If

useIframe set to True, create iframe.

param String text:
 
param OpenLayers.Layer layer:
 
HSLayers.Control.Query.onInfo()
Information arrived, the application can use this method for custom

handler

HSLayers.Control.Query.onResultRendered()

Information arrived, do the final things

HSLayers.Control.Query.destroyPopup()
HSLayers.Control.Query.createPopup(lonlat)

:param <a href=”http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/LonLat-js.html“>OpenLayers.LonLat</a> lonlat:

HSLayers.Control.Query.makeCoordsHtml()

make html string with coordinates of clicked region

HSLayers.Control.Query.appendHtml(evt)
this function should be redefined by the application

it should return text, which will be appended in the info panel

param evt:{Event} original event
returns:
rtype:String

Main Menu


Table Of Contents

Previous topic

HSLayers.Control.ProjectionSwitcher (class)

Next topic

HSLayers.Control.ReadState (class)

This Page