(Several days ago a user on gis stackexchange suggest that I should use OpenGeo (I was using geojson before). I succeed at what I was doing at that time, but now I have a different problem.)
I was using MySQL, but for easier work with GeoServer I decidec to migrate to PostgreSQL. I spend a few days to migrate a PHP project.
I have a table events with fields: id(integer), name (varchar), ... , and coords(point). I am trying to display some point/icon/whatever on layer, where the event is taking place. I went through different tutorials on OpenGeo, GeoServer, Google ... For now I manage to create a SQL layer with SQL statement: SELECT id, coords FROM realestate WHERE coords IS NOT NULL.
But when I go to LayerPreview and click OpenLayers->Go, the browser download file (with wms filename) with content
?xml version="1.0" encoding="UTF-8" standalone="no"?>!DOCTYPE ServiceExceptionReport SYSTEM "http://localhost.just_for_validation:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> ServiceExceptionReport version="1.1.1" > ServiceException> /ServiceException>/ServiceExceptionReport>
(I had to remove all < characters.)
I am not sure if I took the right approach. To sum up: I have PostgreSQL table with several fields, one of them is coords(point). I want to display icon/dot/image/something on map with OpenLayers through GeoServer WMS. I don't know how to create layer which draw dot on lat,lon based on coords field in PostgreSQL.