-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: ability to toggle on a feature table as another form of navigating data #14
base: master
Are you sure you want to change the base?
Conversation
@@ -38,6 +43,9 @@ const liveDetailsNode = document.getElementById("details"); | |||
|
|||
const numberPerPage: number = 7; | |||
|
|||
/* 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.