Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the ArcGIS Server JS API the Popup object may be defined against an array of features.

In that case the Popup contains Next/Previous buttons to allow the user to "page" through each feature in turn, as in this example where there are multiple coincident features at the chosen location:

enter image description here

Is this possible using OpenLayers? That is, given an array of features can I easily navigate the infoWindow forward/backward to display the relevant information for each feature?


share|improve this question
up vote 1 down vote accepted

I don't think there is a default OpenLayers way of doing this (although I am happy to be proved wrong), but you could build one yourself within a standard 'single feature' popup. We've done something similar on our application Dorset Explorer 3.

We basically loop though all the results and build a list, each of them clickable with more information. Try it out and maybe you'll get some inspiration. Just go to the link, open the Layer Control (on the right, icon of two rectangles on top of each other) and turn on a couple of layers such as Rights of Way (In countryside folder), Counties, Districts (In Administrative Boundaries folder) etc. and then do an info search by clicking once at a point and it should return multiple results. You'll see they are grouped by Layer Name and list all features found at the point you clicked.

I know this isn't necessarily an answer but I hope it gives you some food for thought. It certainly wasn't going to fit in a comment!

share|improve this answer
Thanks Rob, that looks like a good approach. Very nice site, by the way! – Stephen Lead Aug 12 '12 at 23:22
Thankyou! I can't take the credit for that one, I just took over from the original devs and started making it a bit slicker :) – Rob Quincey Aug 13 '12 at 8:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.