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-textbox but it was in 2017!
Thank you for your help!
Just updated that codepen by adding an expand widget . Hope it helps
https://codepen.io/sagewall/pen/OJwvWMb
Thank you ,it works like a charm!
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.
Thank you @Sage_Wall , it's like that! I will take some time to test and I tell you if it 's ok
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
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
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.