當前位置: 首頁>>代碼示例 >>用法及示例精選 >>正文


JavaScript ArcGIS Accessor.get用法及代碼示例


基本信息

以下是所在類或對象的基本信息。

AMD: require(["esri/core/Accessor"], (Accessor) => { /* code goes here */ });

ESM: import Accessor from "@arcgis/core/core/Accessor";

類: esri/core/Accessor

子類: ActionBase , ActiveLayerInfo , AddressCandidate , AddressCandidate , AggregatedGeometry , ApplicationProperties , ApplicationProperties , AreaMeasurement3DViewModel , AreasAndLengthsParameters , AreasAndLengthsParameters , Association , AssociationGeometriesResult , AttachmentInfo , AttachmentQuery , AttachmentQuery , AttachmentsViewModel , AttributeColorInfo , AttributionViewModel , AuthoringInfo , AuthoringInfoVisualVariable , Background , BarChartMediaInfo , BarcodeScannerInput , Basemap , BasemapGalleryItem , BasemapGalleryViewModel , BasemapLayerListViewModel , BasemapToggleViewModel , BasemapView , Bookmark , BookmarksViewModel , BufferParameters , BufferParameters , BuildingComponentSublayerView , BuildingExplorerViewModel , BuildingFilter , BuildingLevel , BuildingPhase , BuildingSublayer , BuildingSummaryStatistics , ButtonMenuItem , ButtonMenuViewModel , Callout3D , Camera , ChartMediaInfoValue , ChartMediaInfoValueSeries , ClassBreakInfo , ClosestFacilityParameters , ClosestFacilityParameters , ClosestFacilitySolveResult , ClosestFacilitySolveResult , CloudyWeather , Collection , ColorBackground , ColorRamp , ColorRamp , ColorSizeStop , ColorStop , ColormapInfo , ComboBoxInput , CompassViewModel , Content , Conversion , CoordinateConversionViewModel , CreateFeaturesWorkflowData , CreateWorkflowData , Credential , CustomTemplate , DataFile , DataFile , DataLayer , DataLayer , DatePickerViewModel , DateTimePickerInput , DaylightViewModel , DensifyParameters , DensifyParameters , DimensionalDefinition , DirectLineMeasurement3DViewModel , DirectionLine , DirectionPoint , DirectionsFeatureSet , DirectionsFeatureSet , DirectionsViewModel , DistanceMeasurement2DViewModel , DistanceParameters , DistanceParameters , Domain , Draw , DrawAction , Edges3D , EditorViewModel , Edits , Element , ElementExpressionInfo , ElevationProfileLine , ElevationProfileViewModel , Environment , ExpandViewModel , ExpressionInfo , ExpressionInfo , FacilityLayerInfo , FeatureEffect , FeatureEffect , FeatureFilter , FeatureFilter , FeatureFormViewModel , FeatureReductionCluster , FeatureReductionSelection , FeatureSet , FeatureSet , FeatureSnappingLayerSource , FeatureTableViewModel , FeatureTemplate , FeatureTemplatesViewModel , FeatureType , FeatureViewModel , Field , FieldColumn , FieldConfig , FieldGroupConfig , FieldInfo , FieldInfoFormat , FindParameters , FindParameters , FindResult , FindResult , FloorFilterViewModel , FlowRenderer , FoggyWeather , Font , FormTemplate , Format , FullscreenViewModel , FunctionResult , GPMessage , GPMessage , GamepadInputDevice , GamepadSettings , GamepadSettings , GeneralizeParameters , GeneralizeParameters , Geometry , GeometryFieldsInfo , Graphic , Ground , GroundView , HandleOwner , Handles , HeatmapColorStop , HeightModelInfo , HistogramViewModel , HomeViewModel , IdentifyParameters , IdentifyParameters , IdentifyResult , IdentifyResult , ImageAngleParameters , ImageAngleResult , ImageHistogramParameters , ImageHistogramParameters , ImageIdentifyParameters , ImageIdentifyParameters , ImageIdentifyResult , ImageIdentifyResult , ImageMediaInfo , ImageMediaInfoValue , ImageParameters , ImagePixelLocationParameters , ImagePixelLocationResult , ImageSample , ImageSampleParameters , ImageSampleResult , InitialViewProperties , InitialViewProperties , Input , InputField , InputFieldGroup , JobInfo , JobInfo , KMLSublayer , LOD , LabelClass , Layer , LayerFloorInfo , LayerListViewModel , LayerOptions , LayerView , LegendLayer , LegendLayer , LegendViewModel , LengthsParameters , LengthsParameters , LevelLayerInfo , Lighting , LineChartMediaInfo , LineOfSightTarget , LineOfSightViewModel , LineStyleMarker3D , LineStylePattern3D , LineSymbolMarker , LinearUnit , LinearUnit , ListItem , LocalBasemapsSource , LocateViewModel , Magnifier , Map , MapFloorInfo , MapImage , MeasurementViewModel , MeshComponent , MeshMaterial , MeshTexture , MosaicRule , NAMessage , NAMessage , Navigation , NavigationToggleViewModel , Network , NetworkElement , NetworkFeatureSet , NetworkUrl , OAuthInfo , OffsetParameters , OffsetParameters , OpacityStop , ParameterValue , ParameterValue , PieChartMediaInfo , PixelBlock , PointBarrier , PointCloudFilter , PointCloudRenderer , PolygonBarrier , PolylineBarrier , PopupTemplate , PopupViewModel , Portal , PortalFolder , PortalGroup , PortalItem , PortalItemResource , PortalQueryParams , PortalQueryResult , PortalRating , PortalUser , Presentation , PrintParameters , PrintParameters , PrintTemplate , PrintTemplate , PrintViewModel , ProjectParameters , ProjectParameters , Query , Query , RadioButtonsInput , RainyWeather , RasterColormapRenderer , RasterData , RasterData , RasterFunction , RasterInfo , RasterShadedReliefRenderer , RasterStretchRenderer , RelatedRecordsInfo , RelatedRecordsInfoFieldOrder , RelationParameters , RelationParameters , Relationship , RelationshipQuery , RelationshipQuery , Renderer , RouteInfo , RouteParameters , RouteParameters , RouteResult , RouteResult , RouteSolveResult , RouteSolveResult , ScaleBarViewModel , ScaleRangeSliderViewModel , ScaleRanges , SceneModification , Search , SearchLayer , SearchLayerField , SearchSource , SearchTable , SearchTableField , SearchViewModel , ServerInfo , ServiceAreaParameters , ServiceAreaParameters , ServiceAreaSolveResult , ServiceAreaSolveResult , ShadowCastViewModel , SiteLayerInfo , SizeStop , SketchViewModel , SlicePlane , SlicePlane , SliceViewModel , Slide , SliderViewModel , SnappingControlsViewModel , SnappingOptions , SpatialReference , StatisticDefinition , StatisticDefinition , Stop , StylePattern3D , Sublayer , SunnyWeather , SwipeViewModel , SwitchInput , Symbol , Symbol3DLayer , SynthesizeAssociationGeometriesParameters , Task , TemplateItem , TemplateItemGroup , TemplateOptions , Terminal , TerminalConfiguration , TextBoxInput , TileInfo , TileMatrixSet , TimeExtent , TimeInfo , TimeInterval , TimePickerViewModel , TimeSliderViewModel , TopFeaturesQuery , TopFilter , TraceLocation , TraceParameters , TraceResult , TrackViewModel , TravelMode , TrimExtendParameters , TrimExtendParameters , UI , UniqueValueInfo , UpdateWorkflowData , UtilityNetworkTraceViewModel , VectorFieldRenderer , View , ViewAnimation , ViewState , Viewing , Viewpoint , VisualVariable , WMSSublayer , WMTSStyle , WMTSSublayer , WeatherViewModel , Widget , Workflow , ZoomViewModel

自從:用於 JavaScript 4.0 的 ArcGIS API

用法說明

Accessor.get函數(或屬性)的定義如下:

get (path) {*}


獲取屬性的值。

屬性的名稱可以引用實例中的屬性。有關詳細信息,請參閱 Working with properties 指南主題。

view.get("scale");

它也可以是指向實例更深處的屬性的路徑。如果路徑中的屬性不存在,get() 返回 undefined

let title = map.get("basemap.title");

// equivalent of
let title = map.basemap && map.basemap.title || undefined;

參數:

類型說明
path String

要獲取的屬性的路徑。

返回:

類型 說明
* 屬性的值。

相關用法


注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 Accessor.get。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。