RE: Google Maps API Thickbox
Home
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?
2008 :: Comment / reply
Hi,
Could you show me exactly how to set the time out with this function ?
function load() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(40.967715,-76.887817), 7);
map.addControl(new GLargeMapControl());
......
Thanks
tkt0680 :: 23 Oct :: 2008 :: Comment / reply
There are a couple of ways, either put it within function load():function load() {
if (GBrowserIsCompatible()) {
setTimeout( function() {
map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(40.967715,-76.887817), 7);
map.addControl(new GLargeMapControl());
......
}, 0.1 );
}
}
or wrap it around the place where you call function load()
24 Oct :: 2008 :: Comment / reply
I tried this fix for loading a google map in a thickbox window. It works on Safari and FF (mac) and FF (PC). But IE and Opera (PC & MAC) still don't work. Does anyone have any ideas?
You can see my example here:
http://www.davidcool.com/gallery_view.php?CID=7&SCID=105&AID=1&IMGID=1418#tanchor1418
Just click on the "map" icon.
Thanks,
David
David :: 8 Nov :: 2008 :: Comment / reply
Over to you, discussion about anything local, but please be considerate... Folkestone on TV, Kent gigs, Find a flatmate, rent a room, property queries, current news, what's new, local events, for sale, local services, what I like about Folkestone, ask questions, offer advice, plug yourself... the more it's used the more useful a resource it will become. If you want a gig listed click here to add it (fixed now!), or just click here to post a message...
Also from the same week
Some more blog posts from the same week as .
The Ramones 1980 [Thursday 6 November 2008]
wahey, thanks for letting me know it is now the Marlowe! [Thursday 6 November 2008]
RE: Toft`s / gigs in 1969 [Saturday 8 November 2008]
Good to have that info [Sunday 5 March 2006]
Toft`s / gigs in 1969 [Saturday 4 March 2006]
RE: Good to have that info [Sunday 5 March 2006]
Danke schon! [Monday 6 March 2006]


