[OpenLayers-Users] How can I display a map with a position changing marker.

Kris Geusebroek kgeusebroek at xebia.com
Wed May 13 02:09:58 EDT 2009


In my case it is stored in WGS84 in separate columns.
To help geoserver a bit I created an extra column with a SDO_GEOMETRY
(using Oracle Spatial db) with EPSG:4326 projection and an extra column
with Dutch RD projection (filled with a trigger) because the rest of
the map is in Dutch RD projection and this way no reprojection needs to
take place.

Cheers Kris

-----Original Message-----
From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org]
On Behalf Of sasi
Sent: Wednesday, May 13, 2009 3:48 AM
To: users at openlayers.org
Subject: Re: [OpenLayers-Users] How can I display a map with a position
changing marker.


There is another thing I want to know.
Which format is the Lon&Lat information stored in the mysql database? Is
this a standard?



Kris Geusebroek wrote:
> 
> Hi,
> 
> 
> Yes that's the whole point.
> The lon, lan will be in your db, you configure your datastore and
layer
> in geoserver
> In your openlayers based client you configure your layers as a vector
> layer with bbox strategy and wfs protocol
> Where the wfs protocol must be configured to connect to the right
layer
> and geoserver instance.
> 
> Something like this:
> 
> 	var wfsLayerOptions = {
> 		url: GEOSERVER_WFS_URL,//something like
> http://localhost:8080/geoserver/wfs
> 		geometryName: "GEOMETRY",
> 		featureNS: FEATURENAMESPACE,//something like
> http://www.blah.org/topp
> 		version: "1.0.0"
> 	};
> 
> 	var layerOptions = {
> 		filter: filter,
> 		projection: RDPROJECTION
> 	};
> 	
> 	wfsLayer = new OpenLayers.Layer.Vector("wfsLayerName", 
> 		OpenLayers.Util.extend({
> 			styleMap: styles[0],
> 			strategies: [
> 				new OpenLayers.Strategy.BBOX(),
> 				new OpenLayers.Strategy.Cluster({
> 					threshold: 2, 
> 					distance: 30
> 				})
> 			],
> 			protocol: new OpenLayers.Protocol.WFS(
> 				OpenLayers.Util.extend({
> 					featureType:
> 'LAYER_NAME_IN_GEOSERVER'
> 				}, wfsLayerOptions)
> 			)
> 		}, layerOptions)
> 	);
> 	
> Cheers Kris
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context:
http://n2.nabble.com/How-can-I-display-a-map-with-a-position-changing-ma
rker.-tp2861920p2878521.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users



More information about the Users mailing list