public class FeatureLayer extends GraphicsLayer
Modifier and Type | Class and Description |
---|---|
static class |
FeatureLayer.EditCapabilities |
static class |
FeatureLayer.EditFieldsInfo |
static class |
FeatureLayer.FeatureCollectionObject |
static class |
FeatureLayer.Modes |
static class |
FeatureLayer.Options |
static class |
FeatureLayer.OwnershipAccessControl |
static class |
FeatureLayer.Popups |
static class |
FeatureLayer.RelatedFeatures |
static class |
FeatureLayer.Relationship |
static class |
FeatureLayer.Selections |
Modifier and Type | Method and Description |
---|---|
void |
addAddAttachmentHandler(AddAttachmentHandler handler)
Add event handler for onAddAttachmentComplete.
|
Deferred |
addAttachment(int objectId,
com.google.gwt.user.client.ui.FormPanel formNode)
Add an attachment to the feature specified by the ObjectId.
|
Deferred |
addAttachment(int objectId,
com.google.gwt.user.client.ui.FormPanel formNode,
AddAttachmentCallback callback)
Add an attachment to the feature specified by the ObjectId.
|
void |
addBeforeApplyEditsHandler(BeforeApplyEditsHandler handler)
Add event handler for onBeforeApplyEdits.
|
void |
addCapabilitiesChange(CapabilitiesChangeHandler handler)
Set the capabilities change handler.
|
void |
addClearSelectionHandler(ClearSelectionHandler handler)
Add event handler for onSelectionClear.
|
void |
addDeleteAttachmentsHandler(DeleteAttachmentsHandler handler)
Add event handler for onDeleteAttachmentsComplete.
|
void |
addEditsCompleteHandler(ApplyEditsHandler handler)
Add event handler for onEditsComplete.
|
void |
addQueryAttachmentInfosHandler(QueryAttachmentInfosHandler handler)
Add event handler for onQueryAttachmentInfosComplete
|
void |
addQueryCountHandler(QueryCountHandler handler)
Add event handler for onQueryCountComplete.
|
void |
addQueryFeaturesHandler(QueryFeaturesHandler handler)
Add event handler for onQueryFeaturesComplete.
|
void |
addQueryIdsHandler(QueryIdsHandler handler)
Add event handler for onQueryIdsComplete.
|
void |
addQueryRelatedFeaturesHandler(QueryRelatedFeaturesHandler handler)
Add event handler for onQueryRelatedFeaturesComplete.
|
void |
addSelectFeaturesHandler(SelectFeaturesHandler handler)
Add event handler for onSelectionComplete.
|
Deferred |
applyEdits(Graphic[] adds,
Graphic[] updates,
Graphic[] deletes)
Apply edits to the feature layer.
|
Deferred |
applyEdits(Graphic[] adds,
Graphic[] updates,
Graphic[] deletes,
ApplyEditsCallback callback)
Apply edits to the feature layer.
|
static boolean |
assertLoaded()
Check that the esri.layers.featurelayer package has been loaded
|
FeatureLayer |
clearSelection()
Clears the current selection.
|
static FeatureLayer |
create(FeatureLayer.FeatureCollectionObject featureCollectionObject)
Creates a new instance of a feature layer object from the ArcGIS Server REST resource
identified by the input URL.
|
static FeatureLayer |
create(FeatureLayer.FeatureCollectionObject featureCollectionObject,
FeatureLayer.Options options)
Creates a new instance of a feature layer object from the ArcGIS Server REST resource
identified by the input URL.
|
static FeatureLayer |
create(java.lang.String url)
Creates a new instance of a feature layer object from the ArcGIS Server REST resource
identified by the input URL.
|
static FeatureLayer |
create(java.lang.String url,
FeatureLayer.Options options)
Creates a new instance of a feature layer object from the ArcGIS Server REST resource
identified by the input URL.
|
Deferred |
deleteAttachments(int objectId,
int[] attachmentIds)
Delete one or more attachments for the feature specified by the input ObjectId.
|
Deferred |
deleteAttachments(int objectId,
int[] attachmentIds,
DeleteAttachmentsCallback callback)
Delete one or more attachments for the feature specified by the input ObjectId.
|
java.lang.String |
getCapabilities()
Information about the capabilities enabled for this layer.
|
java.lang.String |
getCopyright()
Copyright information for the layer.
|
java.lang.String |
getDefaultDefinitionExpression()
Metadata describing the default definition expression for the layer as defined by the service.
|
java.lang.String |
getDefinitionExpression()
Returns the current definition expression.
|
java.lang.String |
getDescription()
The description of the layer as defined in the map service.
|
java.lang.String |
getDisplayField()
The name of the layer's primary display field.
|
FeatureLayer.EditCapabilities |
getEditCapabilities()
Returns an object that describes the edit capabilities of the layer.
|
FeatureLayer.EditCapabilities |
getEditCapabilities(Graphic graphic,
java.lang.String userId)
Returns an object that describes the edit capabilities of the layer.
|
FeatureLayer.EditFieldsInfo |
getEditFieldsInfo()
Indicates the field names for the editor fields.
|
com.google.gwt.core.client.JsArray<Field> |
getFields()
The array of fields in the layer.
|
Extent |
getFullExtent()
The full extent of the layer.
|
java.lang.String |
getGeometryType()
Geometry type of the features in the layer.
|
java.lang.String |
getGlobalIdField()
The globalIdField for the layer.
|
int |
getLayerId()
Unique ID of the layer that the FeatureLayer was contructed against.
|
double |
getMaxAllowableOffset()
Returns the current value of the maxAllowableOffset used by the layer.
|
int |
getMaxRecordCount()
The maximum number of results that will be returned from a query.
|
float |
getMaxScale()
Maximum visible scale for the layer.
|
float |
getMinScale()
Minimum visible scale for the layer.
|
java.lang.String |
getName()
The name of the layer as defined in the map service.
|
java.lang.String |
getObjectIdField()
The name of the field that contains the Object ID field for the layer.
|
FeatureLayer.OwnershipAccessControl |
getOwnershipBasedAccessControlForFeatures()
Indicates the ownership access control configuration.
|
com.google.gwt.core.client.JsArray<FeatureLayer.Relationship> |
getRelationships()
Each element in the array is an object that describes the layer's relationship with another
layer or table.
|
com.google.gwt.core.client.JsArray<Graphic> |
getSelectedFeatures()
Gets the currently selected features.
|
Symbol |
getSelectionSymbol()
Gets the current selection symbol.
|
LayerDataSource |
getSourceAsLayerDataSource()
The dynamic layer or table source
|
LayerMapSource |
getSourceAsLayerMapSource()
The dynamic layer or table source
|
com.google.gwt.core.client.JsArray<FeatureTemplate> |
getTemplates()
An array of feature templates defined in the Feature Service layer.
|
TimeExtent |
getTimeDefinition()
Get the current time definition applied to the feature layer.
|
TimeInfo |
getTimeInfo()
Time information for the layer, such as start time field, end time field, track id field,
layers time extent and the draw time interval.
|
java.lang.String |
getType()
Specifies the type of layer.
|
java.lang.String |
getTypeIdField()
The field that represents the Type ID field.
|
com.google.gwt.core.client.JsArray<FeatureType> |
getTypes()
An array of sub types defined in the Feature Service layer.
|
double |
getVersion()
The version of ArcGIS Server where the layer is published.
|
boolean |
hasAttachments()
True if attachments are enabled on the feature layer.
|
java.lang.String |
htmlPopupType()
The html popup type defined for the layer.
|
boolean |
isEditable()
Returns true if the FeatureLayer is editable.
|
Deferred |
queryAttachmentInfos(int objectId)
Query for information about attachments associated with the specified ObjectIds.
|
Deferred |
queryAttachmentInfos(int objectId,
QueryAttachmentInfosCallback callback)
Query for information about attachments associated with the specified ObjectIds.
|
Deferred |
queryCount(Query query)
Get a count of the number of features that satisfy the input query.
|
Deferred |
queryCount(Query query,
QueryCountCallback callback)
Get a count of the number of features that satisfy the input query.
|
Deferred |
queryFeatures(Query query)
Query features from the feature layer.
|
Deferred |
queryFeatures(Query query,
QueryFeaturesCallback callback)
Query features from the feature layer.
|
Deferred |
queryIds(Query query)
Query for ObjectIds.
|
Deferred |
queryIds(Query query,
QueryIdsCallback callback)
Query for ObjectIds.
|
Deferred |
queryRelatedFeatures(RelationshipQuery relQuery)
Query features or records, from another layer or table, related to features in this layer.
|
Deferred |
queryRelatedFeatures(RelationshipQuery relQuery,
QueryRelatedFeaturesCallback callback)
Query features or records, from another layer or table, related to features in this layer.
|
void |
refresh()
Refreshes the features in the feature layer.
|
Deferred |
selectFeatures(Query query)
Selects features from the FeatureLayer.
|
Deferred |
selectFeatures(Query query,
FeatureLayer.Selections selectionMethod)
Selects features from the FeatureLayer.
|
Deferred |
selectFeatures(Query query,
FeatureLayer.Selections selectionMethod,
SelectFeaturesCallback callback)
Selects features from the FeatureLayer.
|
Deferred |
selectFeatures(Query query,
SelectFeaturesCallback callback)
Selects features from the FeatureLayer.
|
FeatureLayer |
setAutoGeneralize(boolean enable)
Enable or disable auto generalization for the layer.
|
FeatureLayer |
setDefinitionExpression(java.lang.String expression)
Set's the definition expression for the FeatureLayer.
|
FeatureLayer |
setEditable(boolean editable)
Set the editability of feature layers created from a feature collection.
|
FeatureLayer |
setGDBVersion(java.lang.String versionName)
Set the layer's data source to the specified geodatabase version.
|
void |
setMaxAllowableOffset(double offset)
Sets the maximum allowable offset used when generalizing geometries.
|
void |
setScaleRange(double minScale,
double maxScale)
Set the scale range for the layer.
|
FeatureLayer |
setSelectionSymbol(Symbol symbol)
Set's the selection symbol for the feature layer.
|
FeatureLayer |
setTimeDefinition(TimeExtent definition)
Set's the time definition for the feature layer.
|
FeatureLayer |
setTimeOffset(int offsetValue,
TimeInfo.TimeUnits offsetUnits)
Time offset allows you to display the features at a different time so they can be overlayed on top of previous or future
time periods.
|
void |
setUseMapTime(boolean update)
Determine if the layer will update its content based on the map's current time extent.
|
boolean |
supportsAdvancedQueries()
When true, the layer supports orderByFields in a query operation.
|
boolean |
supportsStatistics()
When true, the layer supports statistical functions in query operations.
|
com.google.gwt.core.client.JavaScriptObject |
toJson()
Returns an easily serializable object representation of the layer.
|
add, addClickHandler, addDblClickHandler, addGraphicAddHandler, addGraphicRemoveHandler, addGraphicsClearHandler, addMouseDownHandler, addMouseDragHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, clear, create, create, disableMouseEvents, enableMouseEvents, getGraphics, getRenderer, remove, setInfoTemplate, setOpacity, setRenderer
addErrorHandler, addLoadHandler, addOpacityChangeHandler, addUpdateEndHandler, addUpdateHandler, addUpdateStartHandler, addVisibilityChangeHandler, getCredential, getId, getOpacity, getUrl, hide, isloaded, isVisible, setOpacity, setVisibility, show
public static FeatureLayer create(java.lang.String url)
url
- - URL to the ArcGIS Server REST resource that represents a feature service.public static FeatureLayer create(java.lang.String url, FeatureLayer.Options options)
url
- - URL to the ArcGIS Server REST resource that represents a feature service.options
- - Optional parameterspublic static FeatureLayer create(FeatureLayer.FeatureCollectionObject featureCollectionObject)
featureCollectionObject
- - layer informationpublic static FeatureLayer create(FeatureLayer.FeatureCollectionObject featureCollectionObject, FeatureLayer.Options options)
featureCollectionObject
- - layer informationoptions
- - Optional parameterspublic static boolean assertLoaded()
public final java.lang.String getCapabilities()
public final java.lang.String getCopyright()
public final java.lang.String getDefaultDefinitionExpression()
public final java.lang.String getDescription()
public final java.lang.String getDisplayField()
public final FeatureLayer.EditFieldsInfo getEditFieldsInfo()
public final com.google.gwt.core.client.JsArray<Field> getFields()
public final Extent getFullExtent()
public final java.lang.String getGeometryType()
public final java.lang.String getGlobalIdField()
public final boolean hasAttachments()
public final java.lang.String htmlPopupType()
public final int getLayerId()
public final int getMaxRecordCount()
public final float getMaxScale()
public final float getMinScale()
public final java.lang.String getName()
public final java.lang.String getObjectIdField()
public final FeatureLayer.OwnershipAccessControl getOwnershipBasedAccessControlForFeatures()
public final com.google.gwt.core.client.JsArray<FeatureLayer.Relationship> getRelationships()
public final LayerMapSource getSourceAsLayerMapSource()
public final LayerDataSource getSourceAsLayerDataSource()
public final boolean supportsAdvancedQueries()
public final boolean supportsStatistics()
public final com.google.gwt.core.client.JsArray<FeatureTemplate> getTemplates()
public final TimeInfo getTimeInfo()
public final java.lang.String getType()
public final java.lang.String getTypeIdField()
public final com.google.gwt.core.client.JsArray<FeatureType> getTypes()
public final double getVersion()
public final Deferred addAttachment(int objectId, com.google.gwt.user.client.ui.FormPanel formNode, AddAttachmentCallback callback)
objectId
- - The ObjectId of the feature to which the attachment is added.formNode
- - GWT FormPanel that contains a file upload field pointing to the file to be added as an attachment.callback
- - The function to call when the method has completed.public final Deferred addAttachment(int objectId, com.google.gwt.user.client.ui.FormPanel formNode)
objectId
- - The ObjectId of the feature to which the attachment is added.formNode
- - GWT FormPanel that contains a file upload field pointing to the file to be added as an attachment.public final Deferred applyEdits(Graphic[] adds, Graphic[] updates, Graphic[] deletes, ApplyEditsCallback callback)
adds
- - Array of features to add to the layer in the feature service. New features are typically created using the Draw toolbar.updates
- - Array of features whose geometry and/or attributes have changed. Features must have a valid OBJECTID. The
geometry of features is typically modified using the Edit toolbar. Attributes are modified using the Attribute Inspector.deletes
- - Array of features to delete. Must have valid ObjectIdcallback
- - This function will be called when the operation is complete.public final Deferred applyEdits(Graphic[] adds, Graphic[] updates, Graphic[] deletes)
adds
- - Array of features to add to the layer in the feature service. New features are typically created using the Draw toolbar.updates
- - Array of features whose geometry and/or attributes have changed. Features must have a valid OBJECTID. The
geometry of features is typically modified using the Edit toolbar. Attributes are modified using the Attribute Inspector.deletes
- - Array of features to delete. Must have valid ObjectIdpublic final FeatureLayer clearSelection()
public final Deferred deleteAttachments(int objectId, int[] attachmentIds, DeleteAttachmentsCallback callback)
objectId
- - The ObjectId of the feature from which the attachment is removed.attachmentIds
- - The array of attachment ids to delete.callback
- - The function to call when the method has completed.public final Deferred deleteAttachments(int objectId, int[] attachmentIds)
objectId
- - The ObjectId of the feature from which the attachment is removed.attachmentIds
- - The array of attachment ids to delete.public final java.lang.String getDefinitionExpression()
public final FeatureLayer.EditCapabilities getEditCapabilities()
public final FeatureLayer.EditCapabilities getEditCapabilities(Graphic graphic, java.lang.String userId)
graphic
- - Check to see if the specified feature can be edited by the specified user.userId
- - The name of the currently logged in user. If the application uses the IdentityManager
the IdentityManager supplies the layer with the userId so this parameter is not required.public final double getMaxAllowableOffset()
public final com.google.gwt.core.client.JsArray<Graphic> getSelectedFeatures()
public final Symbol getSelectionSymbol()
public final TimeExtent getTimeDefinition()
public final boolean isEditable()
public final Deferred queryAttachmentInfos(int objectId, QueryAttachmentInfosCallback callback)
objectId
- - The ObjectId for the feature to query for attachment information.callback
- - The function to call when the method has completed.public final Deferred queryAttachmentInfos(int objectId)
objectId
- - The ObjectId for the feature to query for attachment information.public final Deferred queryCount(Query query, QueryCountCallback callback)
query
- - The input query. The query object has the following restrictions to avoid conflicts between layer and map properties.
- outFields specified by the query object are overriden by the outFields specified in the FeatureLayer constructor.
- The returnGeometry value specified by the query object is ignored and true is used.
- The outSpatialReference set by the query object is ignored and the map's spatial reference is used.callback
- - The function to call when the method has completed.public final Deferred queryCount(Query query)
query
- - The input query. The query object has the following restrictions to avoid conflicts between layer and map properties.
- outFields specified by the query object are overriden by the outFields specified in the FeatureLayer constructor.
- The returnGeometry value specified by the query object is ignored and true is used.
- The outSpatialReference set by the query object is ignored and the map's spatial reference is used.public final Deferred queryFeatures(Query query, QueryFeaturesCallback callback)
query
- - The input query. The query object has the following restrictions to avoid conflicts between layer and map properties.
- outFields specified by the query object are overriden by the outFields specified in the FeatureLayer constructor.
- The returnGeometry value specified by the query object is ignored and true is used.
- The outSpatialReference set by the query object is ignored and the map's spatial reference is used.callback
- - The function to call when the method has completed.public final Deferred queryFeatures(Query query)
query
- - The input query. The query object has the following restrictions to avoid conflicts between layer and map properties.
- outFields specified by the query object are overriden by the outFields specified in the FeatureLayer constructor.
- The returnGeometry value specified by the query object is ignored and true is used.
- The outSpatialReference set by the query object is ignored and the map's spatial reference is used.public final Deferred queryIds(Query query, QueryIdsCallback callback)
query
- - The input query. The query object has the following restrictions to avoid conflicts between layer and map properties.
- outFields specified by the query object are overriden by the outFields specified in the FeatureLayer constructor.
- The returnGeometry value specified by the query object is ignored and true is used.
- The outSpatialReference set by the query object is ignored and the map's spatial reference is used.callback
- - The function to call when the method has completed.public final Deferred queryIds(Query query)
query
- - The input query. The query object has the following restrictions to avoid conflicts between layer and map properties.
- outFields specified by the query object are overriden by the outFields specified in the FeatureLayer constructor.
- The returnGeometry value specified by the query object is ignored and true is used.
- The outSpatialReference set by the query object is ignored and the map's spatial reference is used.public final Deferred queryRelatedFeatures(RelationshipQuery relQuery, QueryRelatedFeaturesCallback callback)
relQuery
- - The input query.callback
- - The function to call when the method has completed.public final Deferred queryRelatedFeatures(RelationshipQuery relQuery)
relQuery
- - The input query.public final void refresh()
public final Deferred selectFeatures(Query query, SelectFeaturesCallback callback)
query
- - The input query. The query object has the following restrictions to avoid conflicts between layer and map properties.
- outFields specified by the query object are overriden by the outFields specified in the FeatureLayer constructor.
- The returnGeometry value specified by the query object is ignored and true is used.
- The outSpatialReference set by the query object is ignored and the map's spatial reference is used.callback
- - The function to call when the method has completed.public final Deferred selectFeatures(Query query)
query
- - The input query. The query object has the following restrictions to avoid conflicts between layer and map properties.
- outFields specified by the query object are overriden by the outFields specified in the FeatureLayer constructor.
- The returnGeometry value specified by the query object is ignored and true is used.
- The outSpatialReference set by the query object is ignored and the map's spatial reference is used.public final Deferred selectFeatures(Query query, FeatureLayer.Selections selectionMethod, SelectFeaturesCallback callback)
query
- - The input query. The query object has the following restrictions to avoid conflicts between layer and map properties.
- outFields specified by the query object are overriden by the outFields specified in the FeatureLayer constructor.
- The returnGeometry value specified by the query object is ignored and true is used.
- The outSpatialReference set by the query object is ignored and the map's spatial reference is used.selectionMethod
- - The selection method defines how the restul of the selection is combined with the existing selection.
The default option is to create a new selection.callback
- - The function to call when the method has completed.public final Deferred selectFeatures(Query query, FeatureLayer.Selections selectionMethod)
query
- - The input query. The query object has the following restrictions to avoid conflicts between layer and map properties.
- outFields specified by the query object are overriden by the outFields specified in the FeatureLayer constructor.
- The returnGeometry value specified by the query object is ignored and true is used.
- The outSpatialReference set by the query object is ignored and the map's spatial reference is used.callback
- - The function to call when the method has completed.public final FeatureLayer setAutoGeneralize(boolean enable)
enable
- - When true, auto generalize is enabled. Default value for non-editable on-demand feature
layers is truepublic final FeatureLayer setDefinitionExpression(java.lang.String expression)
expression
- - example: "STATE_NAME = 'South Carolina'"public final FeatureLayer setEditable(boolean editable)
editable
- - When true, the layer will be set as editable.public final FeatureLayer setGDBVersion(java.lang.String versionName)
versionName
- - The name of the geodatabase version to use as the layer's data source.public final void setMaxAllowableOffset(double offset)
public final void setScaleRange(double minScale, double maxScale)
minScale
- - The minimum scale for the layer. If the map is zoomed out beyond the
specified scale the layer will not be visible. A value of 0 means the layer does not
have a minimum scale.maxScale
- - The maximum scale for the layer. If the map is zoomed out beyond the
specified scale the layer will not be visible. A value of 0 means the layer does not
have a maximum scale.public final FeatureLayer setSelectionSymbol(Symbol symbol)
symbol
- - Symbol for the current selection. Make sure the symbol type is appropriate for the geometry type of the layer.public final FeatureLayer setTimeDefinition(TimeExtent definition)
definition
- - The new time extent used to filter the layer.public final FeatureLayer setTimeOffset(int offsetValue, TimeInfo.TimeUnits offsetUnits)
offsetValue
- - The length of time to offset from "this" time. Specify a positive or negative whole number.offsetUnits
- - Units in wich the offset is specified.public final void setUseMapTime(boolean update)
update
- - When false the layer will not update its content based on the map's time extent. Default value is true.public final com.google.gwt.core.client.JavaScriptObject toJson()
public final void addAddAttachmentHandler(AddAttachmentHandler handler)
handler
- - Fires when addAttachments() is complete.public final void addBeforeApplyEditsHandler(BeforeApplyEditsHandler handler)
handler
- - Fired before edits are applied to the feature layer.public final void addCapabilitiesChange(CapabilitiesChangeHandler handler)
handler
- - Fired when the capabilities of the layer are modified using the setEditable method. (As of v2.6)public final void addDeleteAttachmentsHandler(DeleteAttachmentsHandler handler)
handler
- - Fires when deleteAttachments is complete.public final void addEditsCompleteHandler(ApplyEditsHandler handler)
handler
- - Fires after applyEdits() has been called.public final void addQueryAttachmentInfosHandler(QueryAttachmentInfosHandler handler)
handler
- - Fires when queryAttachmentInfos() is complete.public final void addQueryCountHandler(QueryCountHandler handler)
handler
- - Fires when the query for the count is complete.public final void addQueryFeaturesHandler(QueryFeaturesHandler handler)
handler
- - Fires when queryFeatures() is complete.public final void addQueryIdsHandler(QueryIdsHandler handler)
handler
- - Fires when queryIds() is complete.public final void addQueryRelatedFeaturesHandler(QueryRelatedFeaturesHandler handler)
handler
- - Fires when queryRelatedFeatures() is complete.public final void addClearSelectionHandler(ClearSelectionHandler handler)
handler
- - Fires when selectFeatures() has completed.public final void addSelectFeaturesHandler(SelectFeaturesHandler handler)
handler
- - Fires when selectFeatures() has completed.