[HOT] Libya Health Facillity Map

andrzej zaborowski balrogg at gmail.com
Mon Jan 9 15:07:21 GMT 2012

Hi Pierre,

2012/1/9 Pierre Béland <infosbelas-gps at yahoo.fr>:
> The World Health Organization (WHO) has asked HOT and the Stand By Task
> Force (SBTF) to activate to map health facilities in in Libya. This should
> be done in a very short period of time.
> For this Task, I have developped a Monitoring Map (Openlayers API) that
> interact with GDoc spreadsheet to facilitate input of information and
> monitoring :
> 1. A GeoRSS overlay containing the GDoc records showing Health Facilities in
> the Registry.
> 2. A function to click on the map to add information about a facility.
> Medical fellows from Libya will then have the possibility to simply add
> information in a GDoc that will later be treated by the Task Force.
> url ->
> http://pierzen.dev.openstreetmap.org/hot/openlayers/libya_health_edit.php


> This API works fine except for the Switch Mode Form (permuting between
> Navigation and Edit Point Mode).
> Since I don't have enough expertise about events in Openlayers, I request
> your help to fix this problem.
> In the HTML, I have radio buttons
>         <div id="controlToggle">
>             <input type="radio" name="type" value="none" id="noneToggle"
>                    onclick="toggleControl(this);" checked="checked" />
>             <label for="noneToggle">Navigate</label>
>         </div>
>         <div>
>             <input type="radio" name="type" value="point" id="pointToggle"
>                    onclick="toggleControl(this);" />
>             <label for="pointToggle">Add Facility</label>
>         </div>
> In the Javascript, the toggleControl(element) function lets permute between
> the two modes. On the other hand,
> the   events.register("click", map, function) opens a popup when we click on
> the map. This should popup only when the Add Facility mode is active.
> I dont succeed in reading status of Controls object.  As I understand it,
> there should be an instruction that will let me know if the Controls(point)
> is active.

The page uses .activate(), in the same way ".active" can be used to
check if the control is active. (Controls["point"].active)

Alternatively using plain html dom "if
(document.getElementById('pointToggle').checked) .." should also work?


More information about the HOT mailing list