I came up with a simpler alternative that will work for now, I just open
another page with a link to Google Map API including the latLng
parameter. Not too elegant but seems to work, thank you for your help on
this.
Ivan
Date: Sun, 16 Dec 2007 13:48:22 -0500
From: David Huynh <[EMAIL PROTECTED]>
Subject: Re: single item map functionality
To: General List <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
You're on the right track. Try something like this:
<div ex:role="lens"
...
ex:onshow="initializeMap(this);"
>
...
<div ex:id-subcontent="map-{{value}}"
ex:latlng-content=".latlng"></div>
...
</div>
And include this Javascript code
<script>
function initializeMap(elmt) {
var itemID = elmt.getAttribute("ex:itemID");
var mapDiv = document.getElementById("map-" + itemID);
var latlng = mapDiv.getAttribute("latlng");
... initialize your map ...
}
</script>
There is a caveat. Right now there is no handler for disposing the maps
created inside lenses. That means that when the lenses are disposed
(simply removed from the DOM), the maps might be leaking memory.
David
begin:vcard
fn:Ivan Zhidov
n:Zhidov;Ivan
tel;work:+19414471199
version:2.1
end:vcard
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general