Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Web Applications with ArcGIS

You're reading from   Building Web Applications with ArcGIS Build an engaging GIS Web application from scratch using ArcGIS

Arrow left icon
Product type Paperback
Published in Nov 2014
Publisher
ISBN-13 9781783552955
Length 138 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Hussein Nasser Hussein Nasser
Author Profile Icon Hussein Nasser
Hussein Nasser
Arrow right icon
View More author details
Toc

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.

Note

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image