FeatureTable widget had lots of updates for this release. FeatureTable and ArcGIS Online Data Tab share common functionality and user experience. You as a developer now can provide the same user experience as the ArcGIS online data tab experience to your end users. The following lists new features, updates and enhancements made to FeatureTable.
FeatureTable now supports related records. If a feature layer has related records, those records can also be viewed and edited directly in the table.
To show the related records in the table, set FeatureTable's showRelatedRecords property to true
.
You will see these related records represented as columns with italicized headers on the right side of the table.
As of 3.18, FeatureTable's syncSelection property is set to false
by default.
Setting it to true
will allow selection of features on the map when a user clicks on records in the table.
However, it won't enable selection of records in the table when a user clicks on a feature on the map. To enable selection from the map to the table,
the developer must explicitly implement the layer's click logic. This is because the application might have its own selection logic elsewhere or their own click logic.
Thus the developer maintains control of the selection logic. For instance, to enable selection from the map to the table, a developer can add logic to push a
button and enable selection of features, instead of using an interactive map click. The click event may already do something else, without selecting the feature; so now the click logic does not
interfere with popup and Editor. If Editor and popup are enabled for selection, it works without conflicting events firing.
As a developer you have the option to select or filter features in the table. If you call FeatureTable's selectRows()
method then the selected records will be highlighted in the table while all other records are still visible. When FeatureTable's clearSelection()
method is called then the selection/highlights will be removed from the table.
If you call FeatureTable's filterRecordsByIds() or
filterSelectedRecords() then the table will only display those records that were filtered.
FeatureTable's clearFilter() method will remove the filter and as well as the selection/highlight from the table.
As of 3.18, FeatureTable's refresh() method re-fetches features from the layer when necessary. For instance, it can be called after you set a layer's definitionExpression. The FeatureTable, then will only display data that meet the definitionExpression criteria.
showColumnHeaderTooltips
- when set to true,
displays tooltips for column headers. Useful to set this property to true when you have long column names.
showRelatedRecords
- when set to true, FeatureTable displays the related records column.
showCyclicalRelationships
- enables or disables FeatureTable's ability to show cyclical relationship.
Refer to the FeatureTable API Reference for more information about cyclical relationship and the ArcGIS Desktop documentation on
Benefits of relationship classes.
selectRows()
- allows users to select row(s) based on their ids. Selected rows will be highlighted in the table.
sort()
- sorts a given field in ascending or descending order.
centerOnSelection()
- centers the map on combined extent of selected rows.
filterRecordsByIds()
- filters the table based on the provided row ids. Only filtered rows will be displayed in the table.
clearFilter()
- removes all filters and selections in the table.
show-attachments
- fires when attachment is displayed in the table.
show-related-records
- fires when related records are displayed in the table.
clear-selection
- fires when selection is cleared in the table.
gridOptions: {sort: {}}
- previously, sort
property was a string.
As of 3.18, sort
is an object with two properties: sort.field
- field name as string and sort.descending
is a boolean.
fieldInfos: {format: {}}
- now, you can use this property to format domain and subtype fields.
syncSelection
is set to false
by default now.
zoomToSelection
is set to false
by default now.
refresh()
- now re-fetches features from the layer when called.
filterSelectedRecords()
- now no longer takes parameters. Allows users more easily filter records.
getFeatureDataById()
- now takes an id <Integer>
or array of ids <Array[Integer]>
.
row-select
- event parameters changed.
At 3.17, event parameter directly returned selected row(s).
At 3.18, rows array is a property of row-select
event parameter. Use evt.rows[n]
to get a row.
row-deselect event
- please notes for row-select
event above.
FeatureTable - related records
-
this new sample demonstrates how to show related records directly in the table.
FeatureTable - Custom Menu Items
-
this sample was updated to show the new selection and refresh behavior for FeatureTable. It shows how to do selections from the table to the map and vice versa.
FeatureTable - Formatting
-
this sample was updated to show the new selection behavior for FeatureTable. It shows to do selection from the table to the map.
Using FeatureTable
-
this sample was updated to show changes in row-select
and row-deselect
events.
This release of the JavaScript API includes some important changes to the VectorTileLayer. With this release, the implementation of the VectorTileLayer has been re-written to be more tightly integrated with the API. The VectorTileLayer still fully supports the current Mapbox Box GL and Vector Tile specifications. The enhancements with this first release of the new vector tile implementation include:
While the underlying implementation is different, existing layers published to ArcGIS Online and Portal for ArcGIS will continue to work.
NOTE: The internal implementation of vector tile layers in 3.x has changed. If you were using any of the undocumented APIs that were part of the previous implementation they will not work with the new version.
WCSLayer
to work with OGC Web Coverage Services.
This layer can retrieve coverage (raster) data and renderer it on the client.Better error handling for edge cases, for example:
It is now possible to reverse the generated elevation profile. Use the Flip Profile
button positioned on the lower left hand corner of the widget to perform this functionality.
It is now possible to choose a dark
theme when working with the calcite stylesheet.
This is similar to what is already available when using the Claro
style.
Please see the Light and Dark Popup Themes
section for more information on this.
WCSLayer
WCSConnection
WCSCoverageDescription
StretchFilter
showColumnHeaderTooltips
, showCyclicalRelationships
, showRelatedRecords
on class FeatureTable
fields
on class FeatureSet
chartOptions
busyIndicatorBackgroundColor
, busyIndicatorBackgroundOpacity
, busyIndicatorFadeDuration
, and busyIndicatorImageUrl
on class ElevationProfile
..on("clear-selection")
, .on("show-attachments")
, .on("show-related-records")
on class FeatureTable
.on("elevation-values")
on class ElevationProfile
.centerOnSelection()
, clearFilter()
, filterRecordsByIds()
, selectRows()
, sort()
on class FeatureTable
setVisibleLayers
method. Version 3.18 of the ArcGIS API for JavaScript include:
dgrid1
directory, whereas version 0.3.17 should reference the dgrid
directory.
Please refer to the dgrid 0.4 Migration Guide for additional information on migrating to the newer version.
Use the repository on GitHub for the JS API TypeScript definitions.