Hi,

I have been trying quite a bit and replaced the code so that each
stage (show and hide) can be influenced.

Therefore I know have the following code:

Jquery:

$(document).ready(function(){

//Hide (Collapse) the toggle containers on load
$('#content1').hide();

$('a').click(function(){
$('#content1').show('slow');
return false;
map.checkResize()
});

$('a#close').click(function(){
$('#content1').hide('slow');
return false;
})

});

CSS:

</script>
<style type="text/css">
#content1{
padding:5px;
margin-top:5px;
width:650px;
}
#map {
height: 250px;
width: 645px;
border: 1px solid black;
text-align: center;
}
</style>

Html:

<a href="#" id="click">Show</a><br />
<a href="#" id="close">Hide</a>
<div class="box">
<div id="content1">
<div id='map'>
{exp:coollocation:mapdiv_example}
{exp:coollocation:map lat="{latitude}" long="{longitude}" zoom="10"
marker="yes"}
</div>
</div>
</div>

Unfortunately, despite putting the map.checkResize() after the show
function still the same result and the marker is still far out in the
left corner. I really tried a lot of scripts and read through tens of
posts about the topic but none solved my issue. I would be very glad
if anyone can help me out here.

The link to an example page with map is http://bit.ly/fqv87p. I have
two toggle buttons (show/hide) now to be found under contact details.

Cheers!
Tammo


On Dec 3, 8:23 pm, Tammo <[email protected]> wrote:
> Hi, I see, the URL got cut off somehow, maybe to long. Here is a short
> versionhttp://bit.ly/fqv87p
>
> It is about a slide panel containing the map going up and down when
> clicking the show map link. The toggleClass function doesn't really
> give me a separate open or closed status so not sure were to place the
> map.checkResize();
>
> Note that I don't think I have a map object as the map is coded within
> a plugin that I use within ExpressionEngine (my CMS system). But of
> course I could go in the plugin code but rather not
>
> Thanks,
> Tammo
>
> On Dec 3, 1:06 am, Rossko <[email protected]> wrote:
>
> > > (also read that posting code is not allowed, so I seem to be doing all
> > > wrong)
>
> > Not so much not allowed, as not so helpful as being able to see/debug
> > the real thing.
>
> > > But, here it 
> > > is:http://www.hospitality-industry.com/index.php/test/test_directory_com...
>
> > (aside : layout is a bit busted in FF2)
>
> > > You find the Show Map link under the contact details.
>
> > I couldn't ?  "contact" at bottom of homepage, or pick a directory
> > entry and look at their 'contact' details, couldn't see a map link.
>
> > > I tried to include map.checkResize(); in my code but that didn't work.
>
> > It should but
> > a) you need an accessible 'map' object in the scope at the time it
> > runs
> > b) you need to run it after any sizing/unhiding event is complete.  I
> > don't know what slideToggle does but if it is an animation thing you
> > may need to wait for that to finish.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to