[GIS] How to overlay points from MySQL served by GeoServer on an OpenLayers map

geoserverlayersMySQLopenlayers-2

This might be a very basic question as I am new to GeoServer.

What I am trying to do:

  1. I have a MySQL table that stores data attached to a spatial point and have latitude and longitude columns to store the location attribute.
  2. Use GeoServer to display these data points as layer.

What has been done:

  1. Create a new table which is duplicate of the original table but also have POINT field which is generated using POINT(orig_lat, orig_lon).
  2. Use the MySQL extension to create a new data store linked with this spatial_table.
  3. Create a new layer here we need two fields called as native and declared SRS, in the demo I had seen EPSG:4326 as the declared SRS and hence I have added that SRS.

Problem:

  1. When I view the layer preview in OpenLayers I do not see any map? Not sure if this is because of SRS or do I need to specify a map layer.
  2. Most of the points seem like they are overlaid on top of each other and zooming and panning does not make much difference. This seems like SRS issue.
  3. Is it possible to overlay the points on top of Google Maps using GeoServer?

Best Answer

For 1 and 2 : try to set "force declared" in SRS Handling combobox. By the way did you define srs for your dataset in MySQL ?

For 3 : No it is not possible if you mean using baselayer in layer preview but if you use openlayers you can overlay your layer that is served by Geoserver on top of google maps or open street maps.