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 have some big & complicated task this time. I have 2 html pages(page1 & page2). Page1 is for viewing tha map. And page2 is for inputing the values(lat-lon) in a form. Any user can input values and any user can view the map(for now there are no security issues). page1 is provided with a text box and a button. text box(mostly a drop down menu) is used to select the layer and button is clicked to view the map. page2 is a simple form with boxes to give layer name,lat-lon values.

Many people suggested me to use Geoserver,postgis,postgreSQL... but I dont understand how they can be used for my project

Task to be done:

1.whenever any user(lets say user2) inputs layer name and lan-lot values in page2, the values should be stored in a table(with table name as layer name).This storage can be done using PHP into postgreSQL, Is there a better way to do this???

2.Now any user(say user1) can select the layer name and click on button to view the map, the markers of that layer(of values present in corresponding table) should be projected on the map. I have to give option to the user to view more than one layer at a time(say with different colored markers for layers).Do I need Geoserver for this????

PostGIS is used to get the values in OL accepted format(JSON) from postgreSQL, but why do I need geoserver???? In other words,how does geoserver & postgis help me to fulfill this task???? your explanation in words helps me a lot instead of any links. Any examples(probably with some code) will also help me.

Expecting reply in view of my task, thankyou

share|improve this question

1) see my answer to OL+Geoserver+PostGIS(postgreSQL) - If you use GeoServer and the WFS-T protocol you don't have to write any new code (which you'll also need to debug and maintain).

2) You can write a bunch of PHP code to extract GeoJSON from PostGIS and send it to your OpenLayers map - and it will probably work fine until you have 50+ markers. If you use GeoServer it will work out of the box and you can use the WMS protocol to send an image of your map with as many points as you want with no browser issues. Colouring the markers and displaying multiple layers comes (practically) for free too.

The bottom line is that you can write code for your self or benefit from many years of development and testing by many developers who have thought about this a lot.

share|improve this answer
+1: OL+Geoserver+PostGIS(postgreSQL) All the way! – CaptDragon Mar 31 '11 at 18:12
I am having more than 10000 points.So for inserting into db I think I can use PHP. but for retrieving I have to use GeoServer with WMS protocol. Thanx for this... Can I get the code for this from any where???(as you mentioned as bottom line) – Vikash Talanki Mar 31 '11 at 18:14
you don't need any code - just use a WMS layer. Check out the OpenLayers examples for details. – iant Apr 2 '11 at 17:31

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.