Book Image

Building Web Applications with ArcGIS

By : Hussein Nasser
Book Image

Building Web Applications with ArcGIS

By: Hussein Nasser

Overview of this book

Table of Contents (13 chapters)

Working with Restaurants' rich content

We learned in the previous section to do a simple relation query when the user clicks on a result. It was quite simple, as it was only a single feature at a time. However, what is required from us is something different. We need to actually show these reviews as the result is displayed, hence we will be dealing with multiple features at the same time. Because of the asynchronous nature of our code, we cannot use the conventional method of querying and waiting for the result, because the code will be long executed and the last result will already be displayed before we can even get the related records of the first result.


Asynchronous code is a piece of code that gets called by an initiator and is executed separately. The initiator does not wait for that code to be completed before resuming the rest of the code segments.

We will learn how to fix this in the next section.

Displaying reviews

We have to make some changes in the ShowResults function. This...