Reimers.dk

.NET, AJAX and Google APIs brought together
Welcome to Reimers.dk Sign in | Join | Help
in Search

TabContainer (AJAX) and .NET Control

Last post 03-03-2010, 12:27 by Steual. 2 replies.
Sort Posts: Previous Next
  •  03-02-2010, 14:15 3042

    TabContainer (AJAX) and .NET Control

    I developed a proedure that reads data from database of addresses and show them on map (geocode addresses). At the end of procedure a use the follwing istructions to center a zoom the map (markers):

    GMap.PostRenderScript = GMap.CenterAndZoomToBounds(GMap.Overlays.Bounds.Center, GMap.Overlays.Bounds)

    GMap.PostRenderScript += GMap.ZoomOut()

    If I put my GoogleMap control (GMap) inside a TabContainer (AJAX ASP.NET control - VS2008), the istructions above don't work, in fact the position shown is incorrect! If I put my GoogleMap control outside TabContainer, it all ok !

    Can someone help me ?

    Regards

    Stefano

  •  03-03-2010, 8:32 3044 in reply to 3042

    Re: TabContainer (AJAX) and .NET Control

    You have to call the CheckResize method on the map whenever you resize the map container, which is effectively what you are doing when you are switching tabs. Have a look at the documentation for GoogleMap.CheckResize().
  •  03-03-2010, 12:27 3045 in reply to 3044

    Re: TabContainer (AJAX) and .NET Control

    Thanks a lot!

     

    Regards

    Stefano

View as RSS news feed in XML