Select to view content in your preferred language

Consuming Parameterized Query layers from web apps

1201
3
Jump to solution
01-28-2022 09:15 PM
raja-gs
Occasional Contributor

Hello,
We're planning to create a Query layer which would reference data from a registered Oracle DB. I see that Query layer accepts range and discrete parameters. Once a feature layer is published with parameters setup, we're looking to consume that layer/map in our custom web application via ArcGIS JavaScript API v4.22. I don't see any documentation on how to pass parameter values via JavaScript.

Is it even possible or parameters are supported only in ArcPro? What are the clients that support Query layer params? Thanks.

0 Kudos
1 Solution

Accepted Solutions
TanuHoque
Esri Regular Contributor

hi @raja-gs 

Here is simple sample that I just came up with and I hope you might find it helpful
https://codepen.io/thoquews/pen/gOXPQbG?editors=1000

This will allow you to aggregate data for any slice or combination of slices. In my example, it is showing total crimes per districts for selected crime types. These results are generated dynamically -- as you realized the polygon layer does NOT have any crime related attributes. I have a point layer that represents crime locations and types. For each request, the results are aggregated dynamically from the point layer and being joined to the polygon layer to visualization.


pls let me know if you have any question.

TanuHoque_0-1643679632566.png

TanuHoque_1-1643679660904.png

 

TanuHoque_2-1643679667162.png

 

TanuHoque_3-1643679672835.png

 

View solution in original post

3 Replies
TanuHoque
Esri Regular Contributor

hi @raja-gs 

Here is simple sample that I just came up with and I hope you might find it helpful
https://codepen.io/thoquews/pen/gOXPQbG?editors=1000

This will allow you to aggregate data for any slice or combination of slices. In my example, it is showing total crimes per districts for selected crime types. These results are generated dynamically -- as you realized the polygon layer does NOT have any crime related attributes. I have a point layer that represents crime locations and types. For each request, the results are aggregated dynamically from the point layer and being joined to the polygon layer to visualization.


pls let me know if you have any question.

TanuHoque_0-1643679632566.png

TanuHoque_1-1643679660904.png

 

TanuHoque_2-1643679667162.png

 

TanuHoque_3-1643679672835.png

 

raja-gs
Occasional Contributor

Thanks so much @TanuHoque ! I tried your sample and it looks like it will work for us. I'll try this out. Thanks again for spending time on this

TanuHoque
Esri Regular Contributor

I'm glad you found it helpful

0 Kudos