Ok, I am able to connect to my data store which is Ms Sql Server 2008 (Express edition). Perhaps, I am not able to show anything on my OpenLayer map.
Example of point in my database:
POINT (2.66131 48.8792)
POINT (2.66131 48.8792)
POINT (2.67789 48.8982)
POINT (2.67789 48.8982)
POINT (2.70361 48.9402)
POINT (2.76454 48.9866)
In my GeoServer 2.0.2, I actually use the default style for point (Red square point). The EPSG of these point in the database is “0” because GeoServer when querying the database it does a polygon to look-in in EPSG:0. In the configuration of GeoServer, it is 4326 with boundaries (BBOX) like this:
Min X: -180
Min Y: -90
Max X: 180
Max Y: 90
Definition of my table
id int (PK)
lon float
lat float
geom geometry
Here’s an example of the query coming from GeoServer:
SELECT "id",CAST("geom".STSrid as VARCHAR) + ':' + "geom".STAsText() as "geom" FROM "TestGeom" WHERE "geom".Filter(geometry::STGeomFromText('POLYGON ((-236.25 -120.234375, -236.25 120.234375, 236.25 120.234375, 236.25 -120.234375, -236.25 -120.234375))', 0)) = 1
It returns a list of points but it does not show in the openlayer “preview mode”.
Is there anything I am missing?
System: Windows XP with GeoServer + JDBC 3.0 plugin + the implementation of MS SQL Server available on sourceforge.
Java JDK/JRE: 1.6
Note: I was looking at the prompt command line window and I saw a lot of error coming out when the query was returning.
Nordès
I found the reason why it was not working. The “Native-SRC” was not setting itself properly (in fact I had no value). Now for no good reason (or miracle), after removing everything and re-creating everything, I now have a Native SRC value and everything shows up.
Nordès
On Mon, Oct 4, 2010 at 4:18 PM, Nordes Lamarre <nordes@anonymised.com> wrote:
Ok, I am able to connect to my data store which is Ms Sql Server 2008 (Express edition). Perhaps, I am not able to show anything on my OpenLayer map.
Example of point in my database:
POINT (2.66131 48.8792)
POINT (2.66131 48.8792)
POINT (2.67789 48.8982)
POINT (2.67789 48.8982)
POINT (2.70361 48.9402)
POINT (2.76454 48.9866)
In my GeoServer 2.0.2, I actually use the default style for point (Red square point). The EPSG of these point in the database is “0” because GeoServer when querying the database it does a polygon to look-in in EPSG:0. In the configuration of GeoServer, it is 4326 with boundaries (BBOX) like this:
Min X: -180
Min Y: -90
Max X: 180
Max Y: 90
Definition of my table
id int (PK)
lon float
lat float
geom geometry
Here’s an example of the query coming from GeoServer:
SELECT "id",CAST("geom".STSrid as VARCHAR) + ':' + "geom".STAsText() as "geom" FROM "TestGeom" WHERE "geom".Filter(geometry::STGeomFromText('POLYGON ((-236.25 -120.234375, -236.25 120.234375, 236.25 120.234375, 236.25 -120.234375, -236.25 -120.234375))', 0)) = 1
It returns a list of points but it does not show in the openlayer “preview mode”.
Is there anything I am missing?
System: Windows XP with GeoServer + JDBC 3.0 plugin + the implementation of MS SQL Server available on sourceforge.
Java JDK/JRE: 1.6
Note: I was looking at the prompt command line window and I saw a lot of error coming out when the query was returning.
Nordès