Glatlng
Home
Pictures
Glatlng, including glatlng in my blog, glatlng in Folkestone, and any mentions of glatlng in my family tree. Also there's a feed of glatlng stories / mentions, a JSON feed of glatlng, a KML feed of glatlng , search my glatlng venue info, glatlng on Your Folkestone. Hope you can find what you're looking for, if not please leave a message about glatlng.
Add glatlng as a venue here, help me out, and the next person.
Blog / forum etc:
Jan8
Had some trouble for a while at work with getting our google maps working with this thickbox, and I put it off for ages (telling people not to put a map in a lightbox), but today I got to the bottom of it. Don't load your map until the lightbox has loaded, by setting a timeout, like:setTimeout( function() {
var map = new GMap2( $('#map' ));
map.setCenter( new GLatLng( 0, 0 ), 0 );
var bounds = new GLatLngBounds();
.
.
.
}, 0.1 );
It's not exactly been bugging me for ages, but it was bugging me ages ago, and then I forgot about it. Now it's fixed! Bit of a dirty hack really.
Where'd everybody go?
Comment / reply
Pictures
I can't remember how I did it right now, I can only suggest looking in the source, it's all integral.
I'll try and update my source code with some comments when I get time... Or, having looked at it again, completely rewrite it, it's rubbish... This looks like the bit you wan though:
var marker = new GMarker( new GLatLng( lat, lon ));
GEvent.addListener( marker, "click", function() {
marker.openInfoWindowTabsHtml( tabs );
} );
marker.lat = lat;
marker.lon = lon;
marker.guid = guid;
var li = document.createElement("li");
li.name = li.id = guid;
var a = document.createElement("a");
a.innerHTML = content;
addEvent( a, "click", function() {
d( "Got a click on link " + guid );
marker.openInfoWindowTabsHtml( tabs );
} );
li.appendChild(a);
myGmap.panel.appendChild(li);
// d( li.innerHTML );

