Hello everybody,
I looking for displaying results from a query to a new box in my map. The user could see the box and could expand it if he wants.
All I find on internet is how to make a query and display the results on the map. I just want to get some attributes and display it. I don't want graphics.
I found this post https://stackoverflow.com/questions/42062363/display-attribute-value-from-arcgis-layer-to-html-textb... but it was in 2017!
Thank you for your help!
Solved! Go to Solution.
Just updated that codepen by adding an expand widget :D. Hope it helps
Hi,
The example you are referring to on stackoverflow has been created with the legacy ArcGIS API for JavaScript 3.x. I can imagine that you would prefer to use the (new) ArcGIS Maps SDK for JavaScript 4.x.
Can you please explain us a little more what it is that you want to accomplish?
Are you not just looking for a Popup?
The Popup widget allows users to view content from feature attributes.
There are several samples available on how to use a Popup, e.g. Custom popup content.
HTH,
Egge-Jan
Hi @KARIMLABIDI , If popups don't fit your use case you can always execute the query and then add the results to your HTML markup. You can see a very simple example of doing that here: https://codepen.io/sagewall/pen/OJwvWMb
Thank you @Sage_Wall , it's like that! I will take some time to test and I tell you if it 's ok
I would like to do something like that https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=popup-editaction with the results in the expand block.
Just updated that codepen by adding an expand widget :D. Hope it helps
Thank you ,it works like a charm!