Class: Item

Cadcorp.GeognoSIS.Item

new Item(config)

Handles queries on individual items.
Parameters:
Name Type Description
config Object Configuration for this object. The config supplied directly extends the control

Members

errorState

Properties:
Name Type Description
errorState boolean Indicates if this item encountered an error durin loading.

events

Properties:
Name Type Description
events Cadcorp.Util.Events Array of queries to execute, consisting of itemUrl and layerIndex.

geognoSISUrl

Properties:
Name Type Description
geognoSISUrl string URL of the GeognoSIS instance used for the layer.

geoJSON

Properties:
Name Type Description
geoJSON Object GeoJSON for the item.

itemUrl

Properties:
Name Type Description
itemUrl string Item URL

layerIndex

Properties:
Name Type Description
events number Item Layer Index

m_lastUpdateGeoJSON

Properties:
Name Type Description
m_lastUpdateGeoJSON Object GeoJSON from the last sucessful update.

properties

Properties:
Name Type Description
properties Object Item properties.

sessionId

Properties:
Name Type Description
sessionId string GeognoSIS Session ID

Methods

construct(config)

Constructor for Cadcorp Based Classes.
Parameters:
Name Type Description
config Object configuration options.

(protected) deleteFailedHandler(jqXHR, textStatus, errorThrown)

Event handler for delete failed.
Parameters:
Name Type Description
jqXHR Object The jquery jqXHR object
textStatus string The string description of the returned error
errorThrown string The textual portion of the HTTP status

deleteItem()

Delete this item

(protected) deleteSuccessHandler(e)

Success Handler for delete success.
Parameters:
Name Type Description
e Object item properties data object.

destroy()

(protected) failedHandler(jqXHR, textStatus, errorThrown)

Method for when a request fails.
Parameters:
Name Type Description
jqXHR Object The jquery jqXHR object
textStatus string The string description of the returned error
errorThrown string The textual portion of the HTTP status

(protected) geoJSONUpdatedSuccessHandler(e)

Success Handler for the update geometry.
Parameters:
Name Type Description
e Object item properties data object.

(protected) geoJSONUpdateFailedHandler(jqXHR, textStatus, errorThrown)

Event handler for update geometry failed.
Parameters:
Name Type Description
jqXHR Object The jquery jqXHR object
textStatus string The string description of the returned error
errorThrown string The textual portion of the HTTP status

(protected) getData_successHandler(e)

Success Handler for the Get Data method.
Parameters:
Name Type Description
e Object item properties data object.

(protected) getGeoJSON_successHandler(e)

Success handler for the Get Geo JSON API request.
Parameters:
Name Type Description
e Object the item GeoJSON returned.

(protected) propertiesUpdatedSuccessHandler(e)

Success Handler for the update properties.
Parameters:
Name Type Description
e Object item properties data object.

(protected) propertiesUpdateFailedHandler(jqXHR, textStatus, errorThrown)

Event handler for update properties failed.
Parameters:
Name Type Description
jqXHR Object The jquery jqXHR object
textStatus string The string description of the returned error
errorThrown string The textual portion of the HTTP status

updateGeometry(newGeoJSON)

Update the geometry of this item
Parameters:
Name Type Description
newGeoJSON string The string representation of the new geogjson

updateProperties(newValues, schemaColumns)

Update the properties of this item
Parameters:
Name Type Description
newValues object The new properties to set on this item
schemaColumns Array.<Cadcorp.GeognoSIS.OverlaySchema> The schema for this layer

Events

GeometryUpdated

Geometry updated Event.
Type:
  • Object
Properties:
Name Type Description
object Cadcorp.GeognoSIS.Item The item

GeometryUpdateFailed

Geometry update failed Event
Type:
  • Object
Properties:
Name Type Description
object Cadcorp.GeognoSIS.Item The item

ItemDeleted

Item Deleted Event.
Type:
  • Object
Properties:
Name Type Description
object Cadcorp.GeognoSIS.Item The item

ItemDeleteFailed

Item Delete failed Event.
Type:
  • Object
Properties:
Name Type Description
object Cadcorp.GeognoSIS.Item The item

ItemPopulated

Item Populated Event.
Type:
  • Object
Properties:
Name Type Description
object Cadcorp.GeognoSIS.Item The found item

PropertiesUpdated

Properties updated Event.
Type:
  • Object
Properties:
Name Type Description
object Cadcorp.GeognoSIS.Item The item

PropertiesUpdateFailed

Properties update failed Event.
Type:
  • Object
Properties:
Name Type Description
object Cadcorp.GeognoSIS.Item The item