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

I am new to web programming here. I have a table which has multiple columns including: Restaurant Name,Restaurant Id, Lat, Lon, City, District, Country.

My requirement is to build a web client using OpenLayers and JavaScript and allow users to search a Restaurant. I am using GeoServer to create a layer from this table.

My problem is : I have to add dropdowns i.e. one for country, another for District /City based on the country selected. This city/district/country mapping has to come from the table which is in Teradata. Is there any way I can get the data to populate the dropdown from GeoServer services Or do I need to create a new service of my own. If I create my own service, can it be hosted from GeoServer.

Any inputs?

share|improve this question
have you though about WFS? – iant Feb 21 '13 at 9:11
I will check some examples to see if wfs with filter works. Thanks! – vyh Feb 21 '13 at 10:31
up vote 2 down vote accepted

There are multiple solutions, each differing in complexity and performance:

  1. Use just OpenLayers and WFS to load the data in an array and then parse and display it yourself.

  2. Use GeoExtJS and a WFS store. Here is an example.

  3. Create your own php (or any other server side technology) services, which return just the distinct values. Call these services in your JavaScript Application, to load the values.

Personally, I feel that if you have quite a bit of data, then Option 3 is the best. But the first two options are not bad, and might be appropriate in some cases.

share|improve this answer

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.