Il 18/10/2010 15:55, P Kishor scrisse:

> I guess what I am looking for is access the to polygon that I just
> drew using the measure control. Obviously, it has been drawn on the
> map by OL. Surely it must be accessible somehow. I just can't figure
> out how.

If you don't want to use some sort of automated mechanism (wms, webgis
and so on) you should try to master the following:

- the objects that ol uses to manage what you draw, You draw "features"
on a "vector layer"

- how to send data to your server. You can use a form on your page and
put the geojson data corresponding to the polygon in field. You can get
the object that corresponds to the polygon in many ways, it depends on
how you want to save data. You can add an event to your object or use
the vector layer events (featuremodified , featureadded, featureremoved,
  afterfeaturemodified, etc.) or use the vector layer features property.

- how to retrieve data from the server. You can do it simply by putting
the geojson data inside a javascript file inside the page.

- if you want to save and load data interactively, without reloading the
page, you can use ol ajax functions.

What you're asking is not difficult to do but you should know better ol
manual and examples.

bye
        maxx
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to