[OpenLayers-Users] dynamic markers

Eric Lemoine eric.c2c at gmail.com
Wed Oct 10 15:47:48 EDT 2007


On 10/10/07, Tara Athan <tara_athan at alt2is.com> wrote:
> I should have been more specific in my question.
> I would like to create the textfile for the markers, titles and
> descriptions dynamically from a database so that users can enter new
> markers and they appear on the map with minimal intervention from me.
> I was planning to do this by the following steps
> 1. the user sees a map displaying the current markers from the text
> file, and an HTML form,
> 2. they click on the map to fill the lat lon fields in the form,
> 3.they type in the title, description and select characteristics from
> dropdown menus that determine the icon
> 4. PHP commands are used to enter this into a database (MySQL or
> PostGRES) on the server, along with an e-mail alert to the database admin
> 5. at regular intervals (i.e. daily), the text file is automatically
> updated from the database
>
> I now know how to do steps 1, 3 and 4 but I'm not so sure about 2 and
> clueless about 5.

For 2 you can register a click event callback on the map, and have the
callback write the lon lat values in the form. This example will
certainly be helpful :
<http://www.openlayers.org/dev/examples/click.html>.

For 5 you can probably use the setTimeout() javascript func.

--
Eric



More information about the Users mailing list