new Overlay(config)
Represents an overlay served from the GeognoSIS http interface
Parameters:
Name |
Type |
Description |
config |
Object
|
Configuration for this object. The config supplied directly extends the control |
Extends
Members
(readonly) abstractText
Properties:
Name |
Type |
Description |
abstractText |
string
|
null
|
Abstract text for this overlay. Retrieved from the _notes& property |
(constant) CLASS_NAME :string
The name of this class
Type:
datasetProperties
Properties:
Name |
Type |
Description |
datasetProperties |
Object
|
null
|
Map of dataset properties |
events
Properties:
- Inherited From:
featureTable
Properties:
Name |
Type |
Description |
featureTable |
null
|
unused at present |
id
Properties:
Name |
Type |
Description |
id |
string
|
A unique ID generated during object instantiation. |
- Inherited From:
ignoreHittableLayer
Properties:
Name |
Type |
Description |
ignoreHittableLayer |
boolean
|
True if this should be omitted from the layers dialog but enabled for feature info requests |
ignoreLayer
Properties:
Name |
Type |
Description |
ignoreLayer |
boolean
|
True if this should be omitted from the layers dialog and feature info requests |
isInGroup
Properties:
Name |
Type |
Description |
isInGroup |
boolean
|
True if this layer is in a group otherwise false |
- Inherited From:
layer
Properties:
Name |
Type |
Description |
layer |
OpenLayers.Layer
|
The Open Layers layer this overlay belongs to |
- Inherited From:
layerIndex
Properties:
Name |
Type |
Description |
layerIndex |
number
|
The layer index |
Properties:
Name |
Type |
Description |
metaDataUUID |
string
|
null
|
The identifier for metadata in a CSW |
name
Properties:
Name |
Type |
Description |
name |
string
|
The name of this overlay |
- Overrides:
Properties:
Name |
Type |
Description |
abstractText |
boolean
|
When performed spatial search this field indicates whether features need to be transformed between map/layer/map coordinate systems |
properties
Properties:
Name |
Type |
Description |
properties |
Object
|
Map of overlay properties |
(readonly) scaleMax
Properties:
Name |
Type |
Description |
scaleMax |
number
|
The maximum scale this overlay is visible and queriable at. If the value is 0 there is no maximum scale |
(readonly) scaleMin
Properties:
Name |
Type |
Description |
scaleMin |
number
|
The minimum scale this overlay is visible and queriable at. If the value is 0 there is no minimum scale |
schema
Properties:
sessionID
Properties:
Name |
Type |
Description |
sessionID |
string
|
The GeognoSIS session ID |
status
Properties:
Name |
Type |
Description |
status |
number
|
The status of the layer. Will be one of the @link Cadcorp.GeognoSIS.Constants.LayerStatus|LayerStatus} values |
task
Properties:
Name |
Type |
Description |
task |
string
|
The type of query being performed, valied values are 'SearchByArea' and 'GetGeometriesOnly' |
themes
Properties:
toggleMaxStatus
Properties:
Name |
Type |
Description |
toggleMaxStatus |
number
|
The maximum status this layer be set to when toggling the layer on and off. Will be one of the Cadcorp.GeognoSIS.Constants.LayerStatus values |
url
Properties:
Name |
Type |
Description |
url |
string
|
The base url to GeognoSIS |
userAdded
Properties:
Name |
Type |
Description |
userAdded |
boolean
|
True if the user added this layer otherwise false |
visibility
Properties:
Name |
Type |
Description |
visibility |
boolean
|
The visibility of this overlay, true if this overlay is visible otherwise false |
- Overrides:
Methods
clearFeatures(callback)
Clears the layer features, does a check first to see if features are present.
Parameters:
Name |
Type |
Description |
callback |
Object
|
|
Returns:
clearFeaturesCheckFailed_handler(e)
Fail method for feature check.
Parameters:
Name |
Type |
Description |
e |
Object
|
event arguments. |
Returns:
clearFeaturesCheckSuccess_handler(e)
If the layer has features, delete them, otherwise treat as success.
Parameters:
Name |
Type |
Description |
e |
Object
|
event arguments |
Returns:
createFeatures(cadcorpFeatures)
Add features to this layer. This function performs an AJAX request and returns immediately.
Fires featuresCreated when the results are ready.
Parameters:
Fires:
createId() → {string}
Create a unique ID value for the layer. If the property CLASS_NAME is defined it will be used as a prefix to the ID, otherwise it will default to 'Cadcorp.GeognoSIS.OverlayBase'.
- Inherited From:
Returns:
The unique ID.
-
Type
-
string
destroy()
Destroys this overlay
- Overrides:
doFeatureInfoQuery(x, y, radius, pageSize)
Performs a spatial query this layer. This function performs an AJAX request and returns immediately.
Fires featureInfoCompleted when the query has been performed.
Parameters:
Name |
Type |
Description |
x |
number
|
The x coordinate to search from |
y |
number
|
The y coordinate to search from |
radius |
number
|
The radius to search in |
pageSize |
number
|
The amount of results per page |
Fires:
doQuery(feature, resultsContainer, pageSize)
Performs a spatial query this layer. This function performs an AJAX request and returns immediately.
Fires searchCompleted when the query has been performed, before the results are available.
Fires the queryCompleted event when the results are available. If no results are found fires the noFeaturesFound event.
Parameters:
Name |
Type |
Description |
feature |
OpenLayers.Feature
|
The feature to query with |
resultsContainer |
Object
|
jQuery object containing the dom element to append the results to |
pageSize |
number
|
The amount of results per page |
Fires:
Gets the metadata from an OGC CSW. This function performs an AJAX request and returns immediately.
Fires metaDataSucceeded when the query has been performed.
Fires:
getFeatureInfoResults(cursor, start, end)
Gets the full data for previously found items. This function performs an AJAX request and returns immediately.
Fires featureInfoAllCompleted when the results are ready.
Parameters:
Name |
Type |
Description |
cursor |
string
|
|
start |
number
|
|
end |
number
|
|
Fires:
Gets a configured query helper for this overlay
Returns:
The new query helper object
-
Type
-
Cadcorp.GeognoSIS.QueryHelper
Gets the schema columns for the layer.
If the schema columns haven't been retrieved then they are queried asynchronously. This function returns null immediately
Returns:
The array of schema columns or null if the schema columns haven't been retrieved
-
Type
-
Array.<Cadcorp.GeognoSIS.OverlaySchema>
|
null
Get the themes for this layer. This function will return immediately. AJAX requests will be performed to get the themes.
The function defined in the callback parameter will be called for each theme
Parameters:
Name |
Type |
Description |
callback |
GetThemesCallback
|
|
Returns:
The themes
-
Type
-
Array.<Cadcorp.GeognoSIS.Theme>
|
null
isVisibleAtScale(scale) → {boolean}
Is this overlay visible at the supplied scale.
Parameters:
Name |
Type |
Description |
scale |
number
|
The scale to test |
Returns:
True if this layer is visible otherwise false
-
Type
-
boolean
processSearchByAreaQueriedItems(cursor, currentPage)
Gets more schema column data and geometries from the cursor. This function performs an AJAX request and returns immediately.
Fires queryCompleted and queryGeometryCompleted when the data has been retieved.
Parameters:
Name |
Type |
Description |
cursor |
string
|
|
currentPage |
number
|
|
Fires:
processSearchByAreaQueriedItemsUsingCusrorStartIndex(cursor, startIndex)
Gets the schema column data and geometries for items. This function performs an AJAX request and returns immediately.
Fires queryCompleted and queryGeometryCompleted when the data has been retieved.
Parameters:
Name |
Type |
Description |
cursor |
string
|
|
startIndex |
number
|
|
Fires:
redraw(force)
Redraw the layer
Parameters:
Name |
Type |
Description |
force |
boolean
|
Force redraw by adding random parameter. |
- Inherited From:
remove()
Removes this overlay from the GeognoSIS session
Fires:
setStatus(newStatus)
Set the status of this layer. This function ignores the toggleMaxStatus property and sets the layer to the desired status.
This function performs an AJAX request and returns immediately.
Fires the visibilitychanged event if the ajax request completes successfully.
Parameters:
Name |
Type |
Description |
newStatus |
number
|
The status to set on the layer, one of the Cadcorp.GeognoSIS.Constants.LayerStatus values |
Fires:
setVisibility(visibility)
Set the visibility of this layer. If the visibility parameter is true the actual status of the layer is determined by the toggleMaxStatus property.
This function performs an AJAX request and returns immediately.
Fires the visibilitychanged event if the ajax request completes successfully.
Parameters:
Name |
Type |
Description |
visibility |
boolean
|
True to make the layer visible otherwise false |
- Overrides:
Fires:
setVisibilityFromLayers()
Sets the visibility of the group.
- Inherited From:
Type Definitions
FeatureInfoResults
Type:
Properties:
Name |
Type |
Description |
object |
Cadcorp.GeognoSIS.Overlay
|
The sender of the event |
features |
Array.<Object>
|
The features found. |
layerName |
string
|
The name of the layer used in this feature info request |
layerIndex |
number
|
The index of the layer the query was performed on. |
totalFeaturesFound |
number
|
The total number of results. |
cursor |
string
|
|
cursorStart |
number
|
|
GetThemesCallback
Callback object for Cadcorp.GeognoSIS.Overlay#getThemes
Type:
Properties:
Name |
Type |
Description |
handler |
function
|
The function that will be called when each theme is queried |
scope |
Object
|
The context that the callbacks will be called in |
Events
createFeatureFailed
Handles features failing on create feature.
Type:
Properties:
Name |
Type |
Description |
jqXHR |
Object
|
response object. |
textStatus |
string
|
text status |
errorThrown |
Object
|
exception |
featureInfoAllCompleted
Feature info all completed event
Type:
featureInfoCompleted
Feature info completed event
Type:
featuresCreated
Features created event
Type:
Properties:
Metadata success event
Type:
Properties:
noFeaturesFound
No features found event
Type:
Properties:
queryCompleted
Query completed event
Type:
Properties:
Name |
Type |
Description |
object |
Cadcorp.GeognoSIS.Overlay
|
The sender of the event |
data |
Object
|
|
layerIndex |
number
|
The index of the layer the query was performed on. |
totalFeaturesFound |
number
|
The total number of results. |
dataTableId |
string
|
The id of the table to append these result to. |
cursorStart |
number
|
|
queryGeometryCompleted
Query geometry completed event
Type:
Properties:
Name |
Type |
Description |
object |
Cadcorp.GeognoSIS.Overlay
|
The sender of the event |
data |
Object
|
The found geometries |
layerIndex |
number
|
The index of the layer the query was performed on. |
cursorStart |
number
|
|
removed
Layer removed event
Type:
Properties:
schemaLoaded
Schema loaded event
Type:
Properties:
searchCompleted
Search completed event
Type:
Properties:
Name |
Type |
Description |
object |
Cadcorp.GeognoSIS.Overlay
|
The sender of the event |
count |
number
|
The number of results found. |
expression |
string
|
The sis expression used for this spatial query |
visibilitychanged
Visibility changed event
Type:
Properties: