SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
main class to filter geometries
Constructor Summary | |
IWGeometryFilter()
|
Method Summary | |
|
clear(map)
resets the geometryFilter (removes renderers and shapes) |
|
drawGetLayerResult(result, renderingAttributes, highlightingAttributes, map, callback, options)
draw the geometries of the given result object on the map. |
|
drawLayer(layerId, , filters, renderingAttributes, highlightingAttributes, map, callback, options)
Requests geometry and attributes from the given layer and draw them on the map. |
|
getLayer(layerId, area, filters, zoom, callback)
Requests geometry and attributes from the given layer. |
|
getLayerAttributes(layerId, filters, offset, limit, callback)
Requests items and their attributes from a layer. |
|
getLayers(callback)
Lists all available layers. |
|
removeLayer(map, layerId)
removes the given layer |
Constructor Detail |
IWGeometryFilter()
Method Detail |
clear(map)
IWMap map
- the map
drawGetLayerResult(result, renderingAttributes, highlightingAttributes, map, callback, options)
object result
- the result of getLayer function (contains array of geometries, extent and layer infos)
object renderingAttributes
- a set of CSS attributes to render the filtered
polygons, e.g. {fill: "red", fillOpacity: 0, stroke: "grey", strokeWidth: 5}
object highlightingAttributes
- a set of CSS attributes to render polygons
while the cursor hovers above them, e.g. {fill: "blue", fillOpacity: 0.5, stroke: "black", strokeWidth: 8}
IWMap map
- the map
function callback
- the callback function
object options
- set tooltip attribute or textAttributes
E.g {tooltip:{value:'$ID$ $NAME$'}, textAttributes:{value:'NAME', renderOptions: {fill: 'red',fontSize: '30px', fontWeight: 'bold'}, boxAttributes: {fill: 'white'}}}
drawLayer(layerId, , filters, renderingAttributes, highlightingAttributes, map, callback, options)
String layerId
- layerId of the layer, e.g. KGS
object{
area an area to bound the shapes, e.g.
{topleft: "697526, 6759257", bottomright: "789250, 6667533"
- , a bounding box
{coord: "726113,6702540", radius: 16758}, a circle
{polygon: ["727641,6713853","739566,6726694","749197,6708808"]}, a polygon
array filters
- a list of filter objects, e.g. {type: "prefix", key: "PLZ", value: "5"} a prefix filter to select only
postal codes starting with 5
object renderingAttributes
- a set of CSS attributes to render the filtered
polygons, e.g. {fill: "red", fillOpacity: 0, stroke: "grey", strokeWidth: 5}
object highlightingAttributes
- a set of CSS attributes to render polygons
while the cursor hovers above them, e.g. {fill: "blue", fillOpacity: 0.5, stroke: "black", strokeWidth: 8}
IWMap map
- a map
function callback
- the callback function
object options
- set tooltip attribute or textAttributes
E.g {tooltip:{value:'$ID$ $NAME$'}, textAttributes:{value:'NAME', renderOptions: {fill: 'red',fontSize: '30px', fontWeight: 'bold'}, boxAttributes: {fill: 'white'}}}
getLayer(layerId, area, filters, zoom, callback)
String layerId
- ID of the layer, e.g. KGS
object area
- an area to bound the shapes, e.g.
{topleft: "697526,6759257", bottomright: "789250,6667533"}, a bounding box
{coord: "726113,6702540", radius: 16758}, a circle
{polygon: ["727641,6713853","739566,6726694","749197,6708808"]}, a polygon
array filters
- a list of filter objects, e.g. {type: "prefix", key: "PLZ", value: "5"} a prefix filter to select only
postal codes starting with 5
number zoom
- preffered zoom level (depends on the zoom range of the layer, if it is out of range no layer is returned). Default is 13
function callback
- the callback function
getLayerAttributes(layerId, filters, offset, limit, callback)
String layerId
- layerId of the layer, e.g. KGS
array filters
- a list of filter objects, e.g. {type: "prefix", key: "PLZ", value: "5"} a prefix filter to select only
postal codes starting with 5
number offset
- index of the first desired element, can be used for paging. 0 determined!
number limit
- number of elements, can be used for paging
function callback
- the callback function
getLayers(callback)
function callback
- function which is called when a result is available
removeLayer(map, layerId)
IWMap map
- the map
String layerId
- layerId of the layer, e.g. KGS