Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.