Appending every map selection (feature layer) response to the same popup

533
3
03-18-2014 11:55 AM
KrishnaGanesan
New Contributor
Taking a looking at the behavior of existing popup examples, looks like it was used mostly to show response of user interaction on a particular layer/point in the map.
Whenever a user clicks on a layer, I would like to append every response to the same popup (as a unordered list item) with a checkbox associated to every item.
Is there a example closer to this user behavior ? or can the existing popup be extended to have this behavior ....

For instance, when i click on a selection
http://developers.arcgis.com/javascript/samples/widget_popupfl/
I would like to add every address as a item to the same popup
0 Kudos
3 Replies
JohnGravois
Frequent Contributor
hi gansri, welcome to our forum!

you can pass whatever you like to infoWindow.setContent(), so you might consider managing your own HTML and incrementally updating it as people click on additional graphics.
0 Kudos
KrishnaGanesan
New Contributor
John,

Thanks

hi gansri, welcome to our forum!
might consider managing your own HTML and incrementally updating it as people click on additional graphics.


With regard to incremental updates to the same popup, where do i store the previous selections ?
My thought process went like using dojo store to have the previous selections saved and on the current selection show the store contents and then the current selection. If the selections have deferred result i can only think of having selections stored in dojo store.
Thoughts ?
0 Kudos
JohnGravois
Frequent Contributor
why store the 'selections'?  why not just keep track of the addresses themselves?

var addresses = null
//on infoWindow.show()
addresses = addresses + </br> + "new address"


if you'd like to take a stab at writing up a sample application (using any technique), i'd be happy to take a look.
0 Kudos