Creates a new instance of a feature layer object from the ArcGIS Server REST resource identified by the input URL. new esri.layers.FeatureLayer( ...
ArcGISDevelopers
Features
Pricing
Documentation
YourName
SignOut
Home
Guide
APIReference
SampleCode
Community
HideTableofContents
APIReferenceOverview
Setupadevelopmentenvironment
PreferredArgumentAliases
esri
basemaps
Color
config
Credential
domUtils
Graphic
graphicsUtils
IdentityManager
IdentityManagerBase
ImageSpatialReference
InfoTemplate
InfoWindowBase
kernel
lang
Map
OperationBase
request
ServerInfo
SnappingManager
SpatialReference
TimeExtent
UndoManager
units
urlUtils
esri/arcadeProfiles
fieldCalculateProfile
labelingProfile
popupProfile
visualizationProfile
esri/arcgis
OAuthInfo
Portal
PortalComment
PortalFolder
PortalGroup
PortalItem
PortalQueryResult
PortalRating
PortalUser
utils
esri/dijit
AttributeInspector
Attribution
Basemap
BasemapGallery
BasemapLayer
BasemapToggle
BookmarkItem
Bookmarks
ClassedColorSlider
ClassedSizeSlider
ColorInfoSlider
ColorPicker
Directions
ElevationProfile
FeatureTable
Gallery
Gauge
Geocoder
HeatmapSlider
HistogramTimeSlider
HomeButton
HorizontalSlider
ImageServiceMeasure
InfoWindow
InfoWindowLite
LayerList
LayerSwipe
Legend
LocateButton
Measurement
ObliqueViewer
OpacitySlider
OverviewMap
Popup
PopupMobile
PopupTemplate
Print
RendererSlider
Scalebar
Search
SizeInfoSlider
SymbolStyler
TimeSlider
VisibleScaleRangeSlider
esri/dijit/analysis
AggregatePoints
AnalysisBase
CalculateDensity
ChooseBestFacilities
ConnectOriginsToDestinations
CreateBuffers
CreateDriveTimeAreas
CreateViewshed
CreateWatersheds
DeriveNewLocations
DissolveBoundaries
EnrichLayer
ExtractData
FindExistingLocations
FindHotSpots
FindNearest
FindSimilarLocations
InterpolatePoints
MergeLayers
OverlayLayers
PlanRoutes
SummarizeNearby
SummarizeWithin
TraceDownstream
esri/dijit/editing
Add
AttachmentEditor
Cut
Delete
Editor
TemplatePicker
Union
Update
esri/dijit/geoenrichment
DataBrowser
Infographic
InfographicsCarousel
InfographicsOptions
InfographicsOptionsItem
esri/dijit/geoenrichment/ReportPlayer
DataProviderGE
PlayerCommands
PlayerResizeModes
PlayerThemes
PlayerViewModes
PlayerZoomBehaviors
ReportPlayer
esri/dijit/util
busyIndicator
esri/geometry
Circle
coordinateFormatter
Extent
geodesicUtils
GeographicTransformation
GeographicTransformationStep
Geometry
geometryEngine
geometryEngineAsync
jsonUtils
mathUtils
Multipoint
normalizeUtils
Point
Polygon
Polyline
projection
scaleUtils
ScreenPoint
screenUtils
webMercatorUtils
esri/layer/pixelFilters
StretchFilter
esri/layers
ArcGISDynamicMapServiceLayer
ArcGISImageServiceLayer
ArcGISImageServiceVectorLayer
ArcGISTiledMapServiceLayer
CodedValueDomain
CSVLayer
DataAdapterFeatureLayer
DataSource
DimensionalDefinition
Domain
DynamicLayerInfo
DynamicMapServiceLayer
FeatureEditResult
FeatureLayer
FeatureTemplate
FeatureType
Field
GeoRSSLayer
GraphicsLayer
ImageParameters
ImageServiceParameters
InheritedDomain
JoinDataSource
KMLFolder
KMLGroundOverlay
KMLLayer
LabelClass
LabelLayer
Layer
LayerDataSource
LayerDrawingOptions
LayerInfo
LayerMapSource
LayerSource
LayerTimeOptions
LOD
MapImage
MapImageLayer
MosaicRule
OpenStreetMapLayer
PixelBlock
QueryDataSource
RangeDomain
RasterDataSource
RasterFunction
RasterLayer
StreamLayer
TableDataSource
TiledMapServiceLayer
TileInfo
TimeInfo
TimeReference
VectorTileLayer
WCSConnection
WCSCoverageDescription
WCSLayer
WebTiledLayer
WFSLayer
WMSLayer
WMSLayerInfo
WMTSLayer
WMTSLayerInfo
esri/plugins
FeatureLayerStatistics
spatialIndex
esri/process
Processor
SpatialIndex
esri/renderers
BlendRenderer
ClassBreaksRenderer
DotDensityRenderer
HeatmapRenderer
jsonUtils
Renderer
ScaleDependentRenderer
SimpleRenderer
smartMapping
SymbolAger
TemporalRenderer
TimeClassBreaksAger
TimeRampAger
UniqueValueRenderer
VectorFieldRenderer
esri/styles
basic
choropleth
heatmap
relationship
size
type
esri/support
expressionUtils
esri/symbols
CartographicLineSymbol
FillSymbol
Font
jsonUtils
LineSymbol
MarkerSymbol
PictureFillSymbol
PictureMarkerSymbol
SimpleFillSymbol
SimpleLineSymbol
SimpleMarkerSymbol
Symbol
TextSymbol
esri/tasks
AddressCandidate
AlgorithmicColorRamp
AreasAndLengthsParameters
BufferParameters
ClassBreaksDefinition
ClassificationDefinition
ClosestFacilityParameters
ClosestFacilitySolveResult
ClosestFacilityTask
ColorRamp
DataFile
DataLayer
Date
DensifyParameters
DirectionsFeatureSet
DistanceParameters
FeatureSet
FindParameters
FindResult
FindTask
GeneralizeParameters
GenerateRendererParameters
GenerateRendererTask
GeometryService
Geoprocessor
GPMessage
IdentifyParameters
IdentifyResult
IdentifyTask
ImageServiceIdentifyParameters
ImageServiceIdentifyResult
ImageServiceIdentifyTask
ImageServiceMeasureParameters
ImageServiceMeasureTask
JobInfo
LegendLayer
LengthsParameters
LinearUnit
Locator
MultipartColorRamp
NAMessage
NAOutputLine
NAOutputPolygon
NATravelDirection
NATypes
NAUTurn
OffsetParameters
ParameterValue
PrintParameters
PrintTask
PrintTemplate
ProjectParameters
Query
QueryTask
RasterData
RelationParameters
RelationshipQuery
RouteParameters
RouteResult
RouteTask
ServiceAreaParameters
ServiceAreaSolveResult
ServiceAreaTask
StatisticDefinition
TrimExtendParameters
UniqueValueDefinition
esri/tasks/datareviewer
BatchValidationJob
BatchValidationJobInfo
BatchValidationParameters
BatchValidationTask
DashboardResult
DashboardTask
GetResultsQueryParameters
ReviewerAttributes
ReviewerFilters
ReviewerLifecycle
ReviewerResultsTask
ReviewerSession
SessionOptions
esri/tasks/geoenrichment
AddressStudyArea
DriveBuffer
DriveUnits
GeographyLevel
GeographyQuery
GeographyQueryBase
GeometryStudyArea
IntersectingGeographies
RingBuffer
StandardGeographyQueryTask
StandardGeographyStudyArea
StudyArea
SubGeographyQuery
esri/tasks/locationproviders
CoordinatesLocationProvider
GeometryLocationProvider
LocationProviderBase
LocationProviderClientBase
LocationProviderRemoteBase
LocatorLocationProvider
QueryTaskLocationProvider
StandardGeographyQueryLocationProvider
esri/toolbars
Draw
Edit
ImageServiceMeasureTool
Navigation
esri/virtualearth
VEAddress
VEGeocoder
VEGeocodeResult
VETiledLayer
esri/workers
WorkerClient
Printthispage
Class:FeatureLayer
[AMDModuleRequire|LegacyModuleRequire]
Constructors|Constants|Properties|Methods|Events
dojo.require("esri.layers.FeatureLayer");
Description
(Addedatv2.0)ThefeaturelayerinheritsfromthegraphicslayerandcanbeusedtodisplayfeaturesfromasinglelayerineitheraMapServiceorFeatureService.Thelayercanbeeithera(spatial)layeror(non-spatial)table.ThefeaturesinafeaturelayercanbeeditediftheisEditablemethodistrue.TheFeatureLayerwill,bydefault,usethedrawinginformationfromtheserver(requiresArcGISServer10orabove).Foranexample,seethesimplerendererintheDrawingInfoathttp://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/EarthquakesFromLastSevenDays/MapServer/0
WebGLrenderingStartingatversion3.24,youcanoptintorenderFeatureLayerwithWebGL.Thisallowsyoutodisplaymoredatainthemapandupdatethevisualizationoffeaturesmorerapidly.ToenableWebGLrenderingofFeatureLayer,pastethefollowingscriptinyourapplicationpriortoloadingtheArcGISAPIforJavaScript:
Onceenabledgloballyfortheapp,WebGLcanbetoggledon/offusingtheAPIbelow:
webglEnabled-Aconstructoroptionandproperty.setWebglEnabled()-AmethodfortogglingWebGLon/offforthelayer.hasWebGLSurface()-AmethodforcheckingwhetheralayerisrenderedwithWebGL.KnownLimitationsThefollowingarecurrentlimitationsofWebGL-renderedFeatureLayerssubjecttochangeinfuturereleases.Ifanyoftheseconditionsarenotmet,thenthelayerwillautomaticallyswitchfromWebGLtoSVGduringthesession.SupportislimitedtolayerscreatedfromfeatureserviceshostedonArcGISOnlineandnon-hostedenterprisefeatureservicesversions10.6.1orlater.FeatureLayerscreatedfromFeatureCollectionsarenotsupported.Polygonlayersmustsupportreturningcentroids.Thelayermustnotbeeditable.Thelayermustnotbeclustered.Thelayermustuseon-demandfetchmode.Thelayermustnotuselabels.ThelayermustnotuseArcadeexpressionscontaininggeometryoperations.Thelayer'srenderermustbeoftypeSimpleRenderer,ClassBreaksRenderer,orUniqueValueRenderer.Colorandopacityvisualvariablesmusthave8stopsorless.Attribute-drivensizevisualvariablesmusthave6stopsorless.Thisdoesnotaffectvariablesdrivenbymapscale.Linesymbolsmustnothavearrowmarkers.Selectionsymbolisnotsupported.NotethatonlytheclickeventwillfirewhenWebGLisenabled.Allothereventsarenotsupported.FeatureLayersubclassesdonotsupportWebGLrendering.Alsonotethatmodifyingattributes,symbol,geometryandvisibilityofindividualfeaturesinaWebGL-renderedlayerwillNOThaveanyeffect.
Samples
Searchforsamplesthatusethisclass.
Classhierarchy
esri/layers.Layer
|_esri/layers.GraphicsLayer
|_esri/layers.FeatureLayer
Subclasses
CSVLayer,DataAdapterFeatureLayer,StreamLayer
Constructors
NameSummary
newesri.layers.FeatureLayer(url,options?)CreatesanewinstanceofafeaturelayerobjectfromtheArcGISServerRESTresourceidentifiedbytheinputURL.
newesri.layers.FeatureLayer(featureCollectionObject,options?)CreatesanewinstanceofafeaturelayerusingaFeatureCollectionobject.
Constants
NameDescription
MODE_AUTODelegatetoeitheron-demandorsnapshotmodedependingonthecharacteristicsoftheservice.Thisisonlyapplicabletohostedfeatureservices.
IfthetotalnumberoffeaturesinalayerarelessthanmaxRecordCountandtotalvertexesislessthan250,000,snapshotmodeisused.Otherwise,on-demandmodeisused.Thepurposebehindthismodeistoreduceserver-sideload.Insteadofgettingasmallnumberoffeatureswithseveralrequests(on-demandmode),getallfeatureswithasinglerequest.Thismoderequiresanadditionalrequesttocompletebeforeretrievinganyfeatures.
MODE_ONDEMANDInon-demandmode,thefeaturelayerretrievesfeaturesfromtheserverwhenneeded.Thisisbasedontherequirementsdefinedinthefollowingproperties:
Mappropertiessuchasthecurrentspatialextentandtimeextent.
Layerpropertiessuchastimeoffsetanddefinitionexpression.
MODE_SELECTIONInselectionmode,featuresareretrievedfromtheserveronlywhentheyareselected.Featuresareavailableontheclientonlywhiletheyareselected.Toworkwithselectedfeatures:
CalltheselectFeaturesmethod.
ListenfortheonSelectionCompleteevent.
OnceonSelectionCompletefires,retrievetheselectedfeaturesusingthegetSelectedFeaturesmethod.
Wheneditingfeaturelayersinselectionmode,youwillneedtoaddthemapserviceassociatedwiththefeatureservicetothemapasadynamicmapservice.Ifyoudonothavethemapserviceaddedasadynamicmapservicethenthechangeswillnotbevisiblebecauseoncetheeditsarecompletethefeatureisnolongerselected.
MODE_SNAPSHOTInsnapshotmode,thefeaturelayerretrievesallthefeaturesfromtheassociatedlayerresourceanddisplaysthemasgraphicsontheclient.Definitionexpressionsandtimedefinitionsarehonored.Thefeaturesareretrievedoncethefeaturelayerisaddedtothemap.AftertheonUpdateEndeventhasfired,youcanaccessthefeaturesusingthegraphicspropertyofthelayerorthroughselectionandqueryoperations.
POPUP_HTML_TEXTThepopupdisplayscontentinHTML/TEXT.
POPUP_NONENopopuptypedefined.
POPUP_URLThepopupdisplaysthecontentsofaURL.
SELECTION_ADDAddsfeaturestothecurrentselectionset.
SELECTION_NEWCreatesanewselection.
SELECTION_SUBTRACTRemovesfeaturesfromthecurrentselection.
Properties
NameTypeSummary
advancedQueryCapabilitiesObjectAnobjectthatcontainsservicelevelmetadataaboutwhetherornotthelayersupportsqueriesusingstatistics,orderbyfields,DISTINCT,pagination,querywithdistance,andreturningquerieswithextents.
allowGeometryUpdatesBooleanReturnstrueifthegeometryofthefeaturesinthelayercanbeedited,falseotherwise.
allowUpdateWithoutMValuesBooleanIndicateswhetherattributefeaturescontainingm-valuescanbeedited.
attributionDataUrlStringTheURL,whenavailable,wherethelayer'sattributiondataisstored.
capabilitiesStringInformationaboutthecapabilitiesenabledforthislayer.
classNameStringclassattributeofthelayer'snode.
copyrightStringCopyrightinformationforthelayer.
credentialCredentialProvidescredentialinformationforthelayersuchasuseridandtokenifthelayerrepresentsaresourcethatissecuredwithtoken-basedauthentication.
dataAttributesString|String[]Listofattributefieldsaddedascustomdataattributestographicsnode.
defaultDefinitionExpressionStringMetadatadescribingthedefaultdefinitionexpressionforthelayerasdefinedbytheservice.
defaultVisibilityBooleanIndicatesthedefaultvisibilityforthelayer.
descriptionStringThedescriptionofthelayerasdefinedinthemapservice.
displayFieldStringThenameofthelayer'sprimarydisplayfield.
editFieldsInfoObjectIndicatesthefieldnamesfortheeditorfields.
editingInfoObjectApplicabletoArcGISOnlinehostedfeatureservices.
fieldsField[]Thearrayoffieldsinthelayer.
fullExtentExtentThefullextentofthelayer.
gdbVersionStringThegeodatabaseversion.
geometryTypeStringGeometrytypeofthefeaturesinthelayer.
globalIdFieldStringTheglobalIdFieldforthelayer.
graphicsGraphic[]Arrayoffeaturesinthelayer.
hasAllFeaturesBooleanIndicateswhetherthelayerdisplaysallfeaturesintersectingthecurrentview.
hasAttachmentsBooleanTrueifattachmentsareenabledonthefeaturelayer.
hasAttributionDataBooleanWhentrue,thelayerhasattributiondata.
htmlPopupTypeStringThehtmlpopuptypedefinedforthelayer.
idStringIDassignedtothelayer.
infoTemplateInfoTemplateTheinfotemplateforthelayer.
labelingInfoLabelClass[]Labeldefinitionforthislayer,specifiedasanarrayoflabelclasses.
layerIdNumberUniqueIDofthelayerthattheFeatureLayerwasconstructedagainst.
loadErrorErrorSetifthelayerfailedtoload.
loadedBooleanWhenthelayerisloaded,thevaluebecomes"true",andlayerpropertiescanbeaccessed.
maxAllowableOffsetNumberThemaximumallowableoffset,onlyapplicableforlayersthatarenoteditable.
maxRecordCountNumberThemaximumnumberofresultsthatwillbereturnedfromaquery.
maxScaleNumberMaximumvisiblescaleforthelayer.
minScaleNumberMinimumvisiblescaleforthelayer.
multipatchOptionStringSupportsfeatureserviceswhosedatasourceisamultipatchfeatureclass.
DefaultisxyFootprintifgeometryTypeisesriGeometryMultiPatch.
nameStringThenameofthelayerasdefinedinthemapservice.
objectIdFieldStringThenameofthefieldthatcontainstheObjectIDfieldforthelayer.
opacityNumberOpacityortransparencyoflayer.
ownershipBasedAccessControlForFeaturesObjectIndicatestheownershipaccesscontrolconfiguration.
refreshIntervalNumberRefreshintervalofthelayerinminutes.
relationshipsObject[]Eachelementinthearrayisanobjectthatdescribesthelayer'srelationshipwithanotherlayerortable.
rendererRendererTherendererforthelayer.
showAttributionBooleanWhentrue,thelayer'sattributionisdisplayedonthemap.
showLabelsBooleanDeterminesiflabelsaredisplayed.
sourceLayerSourceThedynamiclayerortablesource.
stylingBooleanIndicateswhetherthelayerisresponsibleforstylinggraphics.
supportsAdvancedQueriesBooleanWhentrue,thelayersupportsorderByFieldsinaqueryoperation.
supportsAttachmentsByUploadIdBooleanWhentrue,thelayersupportsuploadingattachmentswithUploadsRESToperation,whichthencanbeusedintheAddAttachmentorUpdateAttachmentRESToperations.
supportsCalculateBooleanWhentrue,thelayersupportstheCalculateRESToperationwhenupdatingfeatures.
supportsFieldDescriptionBooleanIftrue,thelayersupportsauser-definedfielddescription.
supportsStatisticsBooleanWhentrue,thelayersupportsstatisticalfunctionsinqueryoperations.
surfaceTypeStringTypeofvectorgraphicssurfaceusedtodrawgraphics.
suspendedBooleanWhentrue,thelayerissuspended.
templatesFeatureTemplate[]AnarrayoffeaturetemplatesdefinedintheFeatureServicelayer.
timeInfoTimeInfoTimeinformationforthelayer,suchasstarttimefield,endtimefield,trackidfield,layerstimeextentandthedrawtimeinterval.
typeStringSpecifiesthetypeoflayer.
typeIdFieldStringThefieldthatrepresentstheTypeIDfield.
typesFeatureType[]AnarrayofsubtypesdefinedintheFeatureServicelayer.
urlStringURLtotheArcGISServerRESTresourcethatrepresentsamapservice.
versionNumberTheversionofArcGISServerwherethelayerispublished.
visibleBooleanVisibilityofthelayer.
visibleAtMapScaleBooleanWhentrue,thelayerisvisibleatthecurrentmapscale.
webglEnabledBooleanIndicatesifWebGLisenabledonthelayer.
Methods
NameReturntypeSummary
addAttachment(objectId,formNode,callback?,errback?)DeferredAddanattachmenttothefeaturespecifiedbytheObjectId.
applyEdits(adds?,updates?,deletes?,callback?,errback?)DeferredApplyeditstothefeaturelayer.
attr(name,value)LayerAddsanewattributeorchangesthevalueofanexistingattributeonthelayer'snode.
clearSelection()FeatureLayerClearsthecurrentselection.
deleteAttachments(objectId,attachmentIds,callback?,errback?)DeferredDeleteoneormoreattachmentsforthefeaturespecifiedbytheinputObjectId.
disableFeatureReduction()NoneDisablesfeaturereduction(forexampleclustering)onthelayer.
disableMouseEvents()NoneDisablesallmouseeventsonthegraphicslayer.
enableFeatureReduction()NoneEnablesfeaturereduction(forexampleclustering)onthelayerusingtheoptionssetinsetFeatureReduction().
enableMouseEvents()NoneEnablesallmouseeventsonthegraphicslayer.
getAggregateGraphics()Graphic[]Returnsgraphicsrepresentingtheaggregationofseveralpointfeaturesclusteredtogether.
getAttributionData()DeferredAsynchrouslyreturnscustomdataforthelayerwhenavailable.
getDefinitionExpression()StringReturnsthecurrentdefinitionexpression.
getDomain(fieldName,options?)DomainReturnstheDomainassociatedwiththegivenfieldname.
getEditCapabilities(options?)ObjectReturnsanobjectthatdescribestheeditcapabilitiesofthelayer.
getEditInfo(feature,options?)ObjectReturnsanobjectdescribingthemostrecenteditoperationperformedonthegivenfeature,ifavailable.
getEditSummary(feature,options?)StringReturnsalocalizedsummaryofthelasteditoperationperformedonthegivenfeature,ifavailable.
getFeatureReduction()ObjectReturnstheoptionsusedtoreducethenumberoffeaturesvisualizedbythelayer(forexampleclustering).
getField(fieldName)FieldReturnstheFieldgiventhespecifiedfieldname.
getMap()MapReturnsreferencetothemapcontrolthelayerisaddedto.
getMaxAllowableOffset()NumberReturnsthecurrentvalueofthemaxAllowableOffsetusedbythelayer.
getNode()HTMLElementReturnsthelayer'sDOMnode.
getOrderByFields()String[]Returnsthelistoffieldsusedtoorderfeaturesby.
getSelectedFeatures()Graphic[]Getsthecurrentlyselectedfeatures.
getSelectionSymbol()SymbolGetsthecurrentselectionsymbol.
getSingleGraphics()Graphic[]Returnsgraphicsfromthelayerthatarenotrepresentedbyaggregategraphicswhenfeaturereduction(suchasclustering)isenabled.
getTimeDefinition()TimeExtentGetthecurrenttimedefinitionappliedtothefeaturelayer.
getType(feature)FeatureTypeReturnsaFeatureTypedescribingthefeature'stype.
hasUpdateError()NoneIndicateswhetheranerroristhrownafterthelayerupdates.
hasWebGLSurface()BooleanIndicatesifthelayerisrenderedinWebGL.
hasXYFootprint()BooleanReturnstrueifgeometryTypeisesriGeometryMultipatchandmultipatchOptionisxyFootprint.
hide()NoneSetsthevisibilityofthelayerto"false".
isEditable()BooleanReturnstrueiftheFeatureLayeriseditable.
isFeatureReductionActive()BooleanIndicatesiffeaturereduction(forexampleclustering)isactiveintheview.
isFeatureReductionEnabled()BooleanIndicatesiffeaturereduction(forexampleclustering)isenabled.
isVisibleAtScale(scale)BooleanReturnstrueifthelayerisvisibleatthegivenscale.
queryAttachmentInfos(objectId,callback?,errback?)DeferredQueryforinformationaboutattachmentsassociatedwiththespecifiedObjectIds.
queryCount(query,callback?,errback?)DeferredGetacountofthenumberoffeaturesthatsatisfytheinputquery.
queryExtent(query,callback?,errback?)DeferredGettheextentoffeaturesthatsatisfytheinputquery.
queryFeatures(query,callback?,errback?)DeferredQueryfeaturesfromthefeaturelayer.
queryIds(query,callback?,errback?)DeferredQueryforObjectIds.
queryRelatedFeatures(relQuery,callback?,errback?)DeferredQueryfeaturesorrecords,fromanotherlayerortable,relatedtofeaturesinthislayer.
redraw()NoneRedrawsallthegraphicsinthegraphicslayer.
refresh()NoneRefreshesthefeaturesinthefeaturelayer.
resume()NoneResumeslayerdrawing.
selectFeatures(query,selectionMethod?,callback?,errback?)DeferredSelectsfeaturesfromtheFeatureLayer.
setAutoGeneralize(enable)FeatureLayerEnableordisableautogeneralizationforthelayer.
setDefinitionExpression(expression)FeatureLayerSetsthedefinitionexpressionfortheFeatureLayer.
setEditable(editable)FeatureLayerSettheeditabilityoffeaturelayerscreatedfromafeaturecollection.
setFeatureReduction(options)NoneSetsfeaturereductionoptionsonthelayer(forexampleclusteringoptions).
setGDBVersion(versionName)FeatureLayerSetthelayer'sdatasourcetothespecifiedgeodatabaseversion.
setInfoTemplate(infoTemplate)NoneSpecifyorchangetheinfotemplateforalayer.
setLabelingInfo(labelingInfo)NoneSetslabelinginfoonthelayer.
setMaxAllowableOffset(offset)NoneSetsthemaximumallowableoffsetusedwhengeneralizinggeometries.
setMaxScale(scale)NoneSetthemaximumscaleforthelayer.
setMinScale(scale)NoneSettheminimumscaleforthelayer.
setOpacity(opacity)NoneInitialopacityortransparencyoflayer.
setRefreshInterval(interval)LayerChangesthelayer'srefreshintervaltothegivenvalue(inminutes).
setRenderer(renderer)NoneSettherendererforthefeaturelayer.
setScaleRange(minScale,maxScale)NoneSetthescalerangeforthelayer.
setSelectionSymbol(symbol)FeatureLayerSetstheselectionsymbolforthefeaturelayer.
setShowLabels(showLabels)NoneSetswhethertodisplaylabelsornot.
setTimeDefinition(definition)FeatureLayerSetsthetimedefinitionforthefeaturelayer.
setTimeOffset(offsetValue,offsetUnits)FeatureLayerTimeoffsetallowsyoutodisplaythefeaturesatadifferenttimesotheycanbeoverlaidontopofpreviousorfuturetimeperiods.
setUseMapTime(update)NoneDetermineifthelayerwillupdateitscontentbasedonthemap'scurrenttimeextent.
setVisibility(isVisible)NoneSetsthevisibilityofthelayer.
setWebGLEnabled(enable)NoneTogglesWebGLrenderingon/offonthelayer.
show()NoneSetsthevisibilityofthelayerto"true".
suspend()NoneSuspendslayerdrawing.
toJson()ObjectReturnsaneasilyserializableobjectrepresentationofthelayer.
Events[OnStyleEvents|ConnectStyleEvent]AllOnStyleeventlistenersreceiveasingleeventobject.Additionally,theeventobjectalsocontainsa'target'propertywhosevalueistheobjectwhichfiredtheevent.Events
NameEventObjectSummary
add-attachment-complete{
result:
}FireswhenaddAttachments()iscomplete.
before-apply-edits{
adds:,
deletes:,
updates:
}Firedbeforeeditsareappliedtothefeaturelayer.
capabilities-changeFiredwhenthecapabilitiesofthelayeraremodifiedusingthesetEditablemethod.
click{
event: