[OpenLayers-Users] writing and saving text and then displaying
it as a wfs layer
Alexandre Dube
adube at mapgears.com
Mon Jan 11 09:01:45 EST 2010
Alauddin,
Please, reply to the list as many other might be able to help you.
Please, take a look at the following example [1]. In it, you have a
vector layer configured to a WFS-T server to allow transactions.
OpenLayers is responsible of generating the transaction by AJAX on
commit. Look at the code of the example for more.
If it can help, I also made a WFS-T little demo a year ago. The
OpenLayers version is outdated, but it might help too [2]. It uses
TinyOWS as the WFS-T server (instead of GeoServer) though.
Hope it helps,
Alexandre
[1] http://openlayers.org/dev/examples/wfs-protocol-transactions.html
[2] http://dev4.mapgears.com/bdga/bdgaWFS-T.html
Alauddin Khan wrote:
> sorry i am new to mapping and this openlayers geoserver thing so i
> could not pick up wht u r saying what i really want is to let user
> write nething i-e label comment joke etc etc on the map displayed nd
> then save it, add it to database and latter on same text as displayed
> as a wfs layer . i mean map is displayed as wms layer then we hav 3
> layers for point line and polygon giving user capability to draw line
> polygon or point and save it now i want to add another layer named as
> text layer which enables to write on the map ne comments note or label
> etc which is u kno then saved can i do this with open layers ? Mr
> imran rajjad from geoserver list suggested me below four point
> strategy which i could not follow up completly his suggestion was
>
> 1-create a shape file with point geometry and upload it on
> geoserver,make sure you keep a field in the attributes for your label.
> 2-write a function that takes X,Y of click and the text you wish to
> display
> 3-insert that point where you clicked on map along with the text into
> the shape file
> 4-create an SLD for this shape file in which you add text symbolizer
> and set it to display the field containing you label.
>
> but i got stuck at point 3 .dont know how to move things forward.
> please help thanks
>
> Regards
> Alauddin
>
> On Fri, Jan 8, 2010 at 6:28 PM, Alexandre Dube <adube at mapgears.com
> <mailto:adube at mapgears.com>> wrote:
>
> Hi,
>
> Take a look at this example [1]. Labels are added to features as
> symbolizer properties, so you could set one of the feature's
> attribute as a value for your label by using ${name} (see the same
> example).
>
> Hope this helps,
>
> Alexandre
>
> [1] http://openlayers.org/dev/examples/vector-features-with-text.html
>
>
> Alauddin Khan wrote:
>
> hi ALL ,
> hop u all fin and in good health. i want to write
> text on my map ( may b some information about a place) and
> then save it so that next time i use my map the text is
> visible there . i know u can use wfs to add new features but
> how will i add text as a new wfs layer in geoserver
>
> thanks
> Regards
> Alauddin
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org <mailto:Users at openlayers.org>
> http://openlayers.org/mailman/listinfo/users
>
>
>
>
> --
> Alexandre Dubé
> Mapgears
> www.mapgears.com <http://www.mapgears.com>
>
>
--
Alexandre Dubé
Mapgears
www.mapgears.com
More information about the Users
mailing list