I am using ajaxToolkit TabPanels... I it appears you are right.  The
problem only occurs if I change to another tab and then come back to
the "Map" tab.  I have the following code (with a call to the
javascript function "refreshMyMap") that I thought would  prevent the
problem but it does not appear to be working.

        <ajaxToolkit:TabContainer ID="TabContainer1" runat="server"
ActiveTabIndex="0" BackColor="DarkGray"
            BorderColor="AliceBlue"
OnClientActiveTabChanged="refreshMyMap">
            <ajaxToolkit:TabPanel ID="TabPanel2" runat="server"
HeaderText="Map" BackColor="Black">
                <ContentTemplate>
                    <asp:Panel ID="Panel1" runat="server"
BackColor="Black" ForeColor="Yellow" Height="100%"
                        Width="100%">

function refreshMyMap() {
    //var map = GoogleMap1;
    var newLat = map.getCenter().lat();
    var newLng = map.getCenter().lng();
    var newZoom = map.getZoom();
    map.checkResize();
    map.setCenter(new GLatLng(newLat, newLng), newZoom);
}


On Jun 29, 1:24 am, Martin <[email protected]> wrote:
> That sounds to me like the behaviour you get when you hide a map
> container and then show it but don't use the GMap2 checkResize()
> method.
> The map thinks it's the wrong size.
>
> http://code.google.com/apis/maps/documentation/javascript/v2/referenc...
>
> Are you showing and hiding your map?
>
> Martin.
>
> On 29 June, 03:39, Mikla <[email protected]> wrote:
>
>
>
> > Has anyone seen a behavior that when you click or doubleclick on a
> > marker, the map moves such that the marker just clicked moves off the
> > top of the map window (by just a little bit), no matter what the zoom
> > level is?
>
> > I can't give a link since this is on my development server and there
> > is far too much code to post here... I was just hoping someone has
> > experienced this before.
>
> > Funny thing is, it was working yesterday and I only made a few
> > changes.  I backed out the changes and it still acts this way.  I also
> > reloaded a previous version of the code that I swear worked fine, and
> > it still does this.
>
> > Thanks.- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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