4 messages in com.googlegroups.google-mashup-editorRe: adding several lists to the same ...| From | Sent On | Attachments |
|---|---|---|
| david lópez | 26 Mar 2008 01:46 | |
| Jason | 26 Mar 2008 19:10 | |
| david lópez | 27 Mar 2008 14:23 | |
| Jason | 01 Apr 2008 01:01 |
| Subject: | Re: adding several lists to the same gm:map![]() |
|---|---|
| From: | Jason (gmej...@google.com) |
| Date: | 04/01/2008 01:01:26 AM |
| List: | com.googlegroups.google-mashup-editor |
Hi david. Yes, I understand what you're trying to do now. My proposed solution isn't terribly elegant, but it should provide a good idea of what you'll need to do.
Two sensor feeds are needed: one listing water storage sensors, the other listing current sensors. Of course, you can add as many feeds as you want, one for each type of sensor. Since the feeds are separate, they can be displayed in separate tables using multiple gm:list modules. To have them appear on the same map, you need to copy the contents of each feed to a separate, temporary feed so all entries are aggregated. (You can reference the sample mashup I linked to above which does just this.) The map's data source should be set to this temporary feed.
Since the markers represent different types of sensors, you won't be able to reference custom elements such as gmd:capacidad_actual in the map's "infotemplate" if they are not pertinent to every sensor. Instead, your best bet is to place all pertinent data in an element common to all feeds such as atom:content. Then reference this element in the infotemplate -- this way, no matter which type of sensor is selected, the proper information will appear in your map's info. windows.
One quick note: I notice in your source that you reference elements called atom:capacidad_maxima and atom:capacidad_actual. The atom namespace (which includes, title, summary, content, etc.) is not extensible in this fashion; instead, you should define a custom namespace for elements not in the original specification. geo: is one such namespace for geo fields. GME's built-in feeds support gmd: which is completely extensible. Just some food for thought.
I hope this helps you. Let me know if you have other questions.
- Jason
On Mar 27, 2:23 pm, david lópez <davi...@googlemail.com> wrote:
Hi Jason, the mashup is at:
http://sector5seiasa.googlemashups.com/
As you can see I have included two content types:
1- A map overlay (KML fomat).
2- A list of sensors (XML file).
Every sensor (Deposito 45 and Deposito 75-a) is capable of monitoring some sort of metric (in this case water storage).
I would like to add another ser of sensors, let's say capable of monitoring electric current.
The issue is to have the second set of sensors listed in a separate list and displayed in the same map with diferent attributes in the balloons.
Any idea ? Thanks for your time.
Regards
On Mar 27, 3:10 am, Jason <gmej...@google.com> wrote:
Hi david. I'm not quite sure what you're trying to do; you can use GME's JavaScript API to combine two or more feeds into one (see the sample mashup below), but these have to be homogeneous -- in other words, all of the entries in the combined feed have to have the same fields.
Can you provide a link to your mashup? This may help me answer your question better. Thanks!
- Jason
On Mar 26, 1:47 am, david lópez <davi...@googlemail.com> wrote:
Hi, Regarding gm:map:
I am trying to insert two different lists (gm:list) in the same map (gm:map).
I need to do this as each list contains different attributes to be represented (in the balloon that pops when clicking on the marker).
So far I haven´t managed to do this, any Idea ?
Thanks a lot, cheers




