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 want to render some data on a map. They are stored as points in my database (postGiS), each one is associated with a name. I want to render points with the same place name in the same color.

However, I don't want to put the name of the places directly in my .xml style file. (Too many places)

Do you know how can I do ?

Maybe an idea is to try to return json data in OpenLayers js, but I don't know how I can get it. Does GeoServer enable to return json to OpenLayers ?

I am totaly lost. Please help !!!


share|improve this question
yes, you are. You should start reading this, this, this and this – Gery May 23 '13 at 20:48

If you are serving your data with Geoserver, let me suggest that you serve the data as a WMS service.

You can style the data with SLD, and have them labeled, like shown in this article: Labeling

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.