[OpenLayers-Users] Newbie question - displaying layer of text objects on a map

Andrew Smith laconical at gmail.com
Fri Mar 20 22:58:30 EDT 2009


Hi all,

I am an absolute beginner when it comes to all things GIS.  I've been
playing with OpenLayers for a few days and am quite impressed with what it
can do so far.  However, something I haven't been able to find any examples
of is showing a text object on a map.

Here's what I want to do. I have a GeoServer map server and a PostGIS
database containing my map data.  In a completely separate database
(Oracle), I have a table which has a bunch of values that are changing
regularly.  Each value has a corresponding lat/lon value.  I want to call a
web service from within OpenLayers which requests the text values (and
corresponding coordinates) and then shows them as a layer on the map.  As in
I want to see the actual text value on the map, not a marker where the text
should be.  I would then periodically redraw the layer to get the updated
values.

I guess my questions are as follows:

1. Can you actually add a layer of text objects in OpenLayers?  If so, what
layer type do you use?  Can anyone point me to a publicly accessible
example?

2. Is my approach reasonable?  I could potentially copy the data from the
Oracle database into the PostGIS database if it would make things easier,
but I'm still not sure how to then get the data from PostGIS into my map. I
know that PostGIS has functions like 'AsGML' and 'AsSVG'. However, this
leads me to more questions:

- I know that SVG supports text objects but don't know if OpenLayers can
overlay SVG objects on maps.  Is SVG even a viable option?

- I know next to nothing about GML. My quick Googling tells me that GML has
things like LineString, Polygon and Point, but I haven't found anything like
a 'Text' element.  Is GML just for displaying vector shape objects?

Thanks

Andrew
-- 
View this message in context: http://n2.nabble.com/Newbie-question---displaying-layer-of-text-objects-on-a-map-tp2512274p2512274.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list