Constructor
new PointQuery(opt_options)
PointQuery interaction
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opt_options |
Object | Interaction options Properties
|
Methods
handleEvent(mapBrowserEvent) → {boolean}
Handles the map browser event
(if it was a
singleclick) and requests info. Generally not called by user code.
This:
Parameters:
Name | Type | Description |
---|---|---|
mapBrowserEvent |
ol/MapBrowserEvent | Map browser event. |
Returns:
false
to stop event propagation.
- Type
- boolean
setMap(map)
Remove the interaction from its current map and attach it to the new map.
Parameters:
Name | Type | Description |
---|---|---|
map |
ol/PluggableMap | Map. |
setActive(active)
Activate or deactivate the interaction.
Parameters:
Name | Type | Description |
---|---|---|
active |
boolean | Active. |
resultHandler(map, errors, infoLayers, featureCollections, coordinates)
Dispatches Event with query results and/or errors
Parameters:
Name | Type | Description |
---|---|---|
map |
ol/Map~Map | Map instance against which the query has been performed |
errors |
Array.<(Error|null)> | Array containing either null (no error) or Error instance for each infoLayer (in the same order as |
infoLayers |
Array.<ol/layer/Layer~Layer> | Layers that have been queried |
featureCollections |
Array.<FeatureCollection> | OpenLayers FeatureCollections |
coordinates |
Array.<Float> | Location queried |
requestInfo(map, coordinates)
Requests info for all layers marked as displaying info and calls handleResponse when complete
Parameters:
Name | Type | Description |
---|---|---|
map |
ol/Map~Map | Map instance to query |
coordinates |
Array.<Float> | Location to query |
clearMarker()
Clean up current displayed marker