Feature: ability to toggle on a feature table as another form of navigating data#14
Feature: ability to toggle on a feature table as another form of navigating data#14nwisehart wants to merge 4 commits into
Conversation
|
|
||
| /* some constants for toggling */ | ||
| const addTable: boolean = true; | ||
| const visTableAttr: Array<[string, string]> = [["Name", 'NAME'], ['Address', 'Address'], ['Elevation (ft)', 'Elevation'], ['Horseback riding', 'HorseTrail'], ['ADA accessibility rating', 'ADAtrail'], ['Dogs allowed', 'TH_LEASH'], ['Biking Allowed', 'BikeTrail'], ['Picnic tables available', 'PICNIC']]; |
There was a problem hiding this comment.
Since this is going to be a configurable app we can't hardcode values for the table fields. We'll need to get them from the layer instead. By default we can display all the layer's fields (minus the Object id and geometry fields). When we setup the configuration options we can let users define the layer and fields to show.
There was a problem hiding this comment.
@nwisehart I think this issue should be addressed before we merge the PR. I think by default we can show all the fields in the layer minus the ObjectId and geometry fields.
| tableToggle.classList.remove("hidden"); | ||
| view.ui.add({ | ||
| component: tableToggle, | ||
| position: "top-left" |
There was a problem hiding this comment.
This is another option we'll want to make configurable.
| } | ||
| tableNode.appendChild(tableRow); | ||
| map.layers.forEach(function(layer){ | ||
| //how should we seperate table for seperate layers? |
There was a problem hiding this comment.
Good question. This is something we'll have to figure out. We'll need to come up with a way to display the table for each layer.
Done in response to issue #11.
Boolean is used to toggle feature on and off in configurable app. User is able to toggle on the table via button in top-right of map, then navigate via keyboard through features and open pop-ups.
Might need more work on how to effectively read out data through live-region. Potential idea in issue #13.