[Ubuntu-be] support.points.map status

Pierre Buyle mongolito404+ubuntu-be at gmail.com
Tue Jul 25 08:20:12 BST 2006


Hoi,

It must have been the heat, I asked for the XHTML generation with
partial requierments while it is already done.

After a quick look at the Google Map API (v2), I don't see how to feed
a map with marker (overlay) using XML.

Anyway, I'm for XHTML generation because if javascript is not enabled
on the user-agent, a list of supporters is displayed. The XHTML for
each supporter is also used in his marker info window. In the
generated XHTML, I used the geo microformat
(http://microformats.org/wiki/geo).

The generated XHTML looks like
 <ul class="supporters_list">
   <li class="supporter" id="supporter_1">
     <span class="firstname">Pierre</span>, a(n) expert user<br>
     living in
     <span class="city">Louvain-la-Neuve</span> (<span
class="zipcode">1348</span>)
     and speaking
     <span class="languages">French.</span>,<br>
     will happily
     <span class="commitments">give you an Ubuntu installation CD set.</span>
     <span class="geo">
       <span class="latitude">50663</span>,
       <span class="longitude">4606</span>
     </span>
    <a class="contact_link"
href="http://server/ubuntu/index.php/supporters/contact/1">Contact
Pierre</a>
   </li>
</ul>

The update_map function will be used with the AJAXed form already
presents in the page (I should put a running version somewhere).
Without Javascript, the form perfoms a POST and a new page is
reloaded. With JS, using DOM remplacement, the form should be modified
to get a new content for the "supporters_list" <ul> and call
update_map (this implies small mdofication to the existing code).

On 7/24/06, Steven Ghyselbrecht <steven.ghyselbrecht at gmail.com> wrote:
>
> Hoi,
>
> Zou het niet simpeler zijn om vanuit de gegevens een XML te creëren. Die
> Google MAP API kan een XML inlezen.
>
> Hi,
>
> Wouldn't it be easyer to make an XML from the supportpoints to read into the
> Google MAP information? It can read XML.
>
> Steven
>
>
> 2006/7/24, Pierre Buyle <mongolito404+ubuntu-be at gmail.com>:
> >
> Hi,
>
> For various reason, I hadn't the time to do all the work I expected
> last week. So there is no great news for the support points map. I've
> a working supporter register form (no edit) and started to work on the
> contact form.
>
> If you have some PHP/Javascript + XHTML skills you can help.
>
> in PHP, your mission, if you accept it, is the write well structured
> PHP code that
> - use an array of "distribution point" objects as input. The objects
> will have the following attributes: name, latitude, longitude,
> zipcode, street and id
> - Generate an XHTML page containing
> - The list of these "distribution points" rendered in XHTML elements
> using the "distributionpoint" classe. The list must have his own XHTML
> id and each distribution point an XHTML id of the form
> distributionpoint_<id> where <id> is the id attribute of the rendered
> object.
> - In a "distributionpoint", when rendered, each attribute of an
> object must be enclosed in a <span class="attributename"> for JS
> consumption.
> - An empty div with id=ubuntu-map
> - The import of a to be write javascript file
> - Near the start of the page, a small javascript to add the "display:
> hide" style the to XHTML list.
>  - An JS onload call to the init_map() function
>
> in Javascript your mission, if you accept it, is the write well
> structured JS code with the following functions
> - init_map
> Initialise a Gmap map "into" the ubuntu-map div and call update_map
> - update_map
> Looks for all XHTML element using th "distributionpoint" class. For
> each of these element create a GMap marker from the data into the
> element (use the DOM) that show the corresponding XHTML element when
> clicked. Add these markers to the map into the ubuntu-map div.
>
> I'm open to suggestion and (construcive) criticism. If you plan to
> write some code, feel free the arrange these requirments if you think
> of a better solution.
>
> PS: For XHTML elements looking, I've seen moo.dom
> (http://moodom.mad4milk.net/) that let you use CSS selectors to get
> DOM elements.

-- 
mongolito404, king of the mongolian people



More information about the ubuntu-be mailing list