definition query like filter

3272
12
10-22-2014 11:54 AM
glennhazelton
Occasional Contributor III

hi

Is there a sample bit of code that I could use to filter point features similar to what the 'definition query' does in arcmap?

I think this would be a great enhancement as my users sometimes only want to see specific location without the clutter of the others.

any help appreciated.

glenn

0 Kudos
12 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Glenn,

   What version of WAB Beta are you using? In Beta 1 and 2 you can define your own operational layers in the main config.json and the layer type of feature could have a attribute of definitionExpression

0 Kudos
glennhazelton
Occasional Contributor III

BBeta 3

i would want the user to be able to define the def. query

iI see that there are samples in the we app publishing templates that do this

one is called find-filter I think

also

can you explain the differnce between just using the JavaScript API and the we app builder.

i Like to be able to use the easy contraction but I am concerned about not being able to just use web services from arc server like I can with the flexviewer.

mostly i'm worried about 'named users' in portal or agol and the associated costs.

seems like all this is getting complicated beyond just building simple maps that provide functionality

maybe what Larry s. Is building outside of the we app builder is the path to sanity

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Glenn,

     WAB is an online or on premise (using the developer version) web application (JS website) builder. To compare this in Flex terms, WAB is like Application builder for Flex Viewer. The difference between using the JS API and WAB is like using the Flex API (you have to do all the application programming) and using ArcGIS Viewer for Flex (Where the web application is built for you can you just configure it). In Beta 1 and Beta2 you did have the ability to use your own ArcGIS Server layer without using a Web Map Id from AGOL or Portal, in Beta3 they messed this up. I hope to see this ability come back in the final release and then WAB will be very similar to ArcGIS Viewer for Flex (in this perspective).

0 Kudos
glennhazelton
Occasional Contributor III

hi Robert,

thanks for the response.

I have been exploring and I found a sample template here (Esri/local-government-online-apps · GitHub ) that I downloaded and configured to use my AGOL webmap. I got to github from the esri list of templates. the one I like is the apps2 (edit-find-filter).

what I am wondering is how hard it is (or what the path to getting it done would be) to take the code for the find/filter and add it to the webappbuilder or to one of the other esri templates like the classic or basic.

the ability to filter out and just display specific features is very useful (at least to me).

I admit to not having a clue how to do this. I looked at the code I downloaded and realized how dependent I am on just configuring tools.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Glenn,

   I don't have any experience taking template code and merging it with WAB

0 Kudos
glennhazelton
Occasional Contributor III

so what is the path forward?

would what is in the template integrate with the Javascript API? maybe I should place a help call.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Glenn, those templates are built using Javascript API.

0 Kudos
glennhazelton
Occasional Contributor III

so then theoretically, if someone experienced was doing it, the filter code could be added to the basic or classic map template. if I can ask, how did you decide to work in the WAB environment instead of just building a viewer using the API?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Glenn,

    Because all the UI leg work is already done for you not to mention the responsive deign work. That would be like asking why no use the Flex API to build an app vs. using the ArcGIS Viewer for Flex.

0 Kudos