new GetFeature(options)
A class to retrieve the feature of the specified layer at a map click and provide a WKT representation of its geometry
Parameters:
Name | Type | Description |
---|---|---|
options |
nyc.ol.geoserver.GetFeature.Options | Constructor options |
- Source:
- See:
Fires:
Members
(static) BufferUnits :string
Buffer units to use when getting a feature at a map click
Type:
- string
Properties:
Name | Type | Description |
---|---|---|
FEET |
string | Feet |
METERS |
string | Meters |
MILES |
string | Statute miles |
NAUTICAL_MILES |
string | Nautical miles |
KILOMETERS |
string | Kilometers |
- Source:
Methods
activate()
Activate to begin capturing map clicks
- Source:
active() → {boolean}
Return the active state
- Source:
Returns:
The active state
- Type
- boolean
callback(data)
The callback that handles GeoServer WFS GetFeature responses
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | The GeoServer WFS GetFeature response |
- Source:
clear()
Remove all captured features
- Source:
deactivate()
Deactivate to stop capturing map clicks
- Source:
getFeatures() → {Array.<nyc.ol.Feature>}
Get the features that have been captured
- Source:
Returns:
The features
- Type
- Array.<nyc.ol.Feature>
Type Definitions
Options
Object type to hold constructor options for nyc.ol.geoserver.GetFeature
Type:
- Object
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
map |
ol.Map | The OpenLayers map with which the user will interact | ||
wfsUrl |
string | A GeoServer WFS URL (i.e. http://localhost/geoserver/wfs) | ||
namespace |
string | The namespace of the layer from which to retrieve features | ||
typeName |
string | The type name of the layer from which to retrieve features | ||
geomColumn |
string | The name of the layer's geometry column that will be queried | ||
propertyNames |
Array.<string> |
<optional> |
The property names of the layer to retrieve with the features | |
buffer |
number |
<optional> |
25 | The buffer radius to use around the map click when querying the layer |
units |
nyc.ol.geoserver.GetFeature.BufferUnits |
<optional> |
feet | The units of the buffer |
style |
ol.style.Style |
<optional> |
The style to use for features added to the map |
- Source:
Events
addfeature
The added feature
Type:
- Source:
removefeature
The removed feature
Type:
- Source: