The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

dchillman (3) [Avatar] Offline
#1
I've been following the application in Chapter 7 - after defining a popupInfo in the config.json as in the chapter I don't see popups on the map. then it dawned upon me that nowhere do you define a "click" event - where is it supposed to be defined? can you provide an example?
thanks
rene.rubalcava (10) [Avatar] Offline
#2
Re: chapter 7 - defining popups
By defining the popupInfo in the webmap spec part of the configuration for the layer, there is no need to create a click event. The arcgisUtils.createMap method handles this for you. So you should be able to click on the layer and get the popup with the defined details. I just tested it out and it seems to be working. If you're getting a different result, please let me know.
dchillman (3) [Avatar] Offline
#3
Re: chapter 7 - defining popups
I had manually coded my solution as I went through the book. When I used your chapter 7-part 5 code the popup functioned correctly (which for some reason I hadn't thought to do before I raised my question). I traced the problem to my index.html - I had included a div with id="map-div" which apparently interferes with the map.js script, which creates that div.