Dear Andrew,
Below is what I have done now. Is that ok and correct?
Thank you.
document.getElementById('left').style.display='none';
var mydiv = document.getElementById("map");
mydiv.style.left = "0px";
mydiv.style.width = "100%";
map.checkResize();
var lat = 3.8;
var lng = 102.5;
map.setCenter(new GLatLng(lat, lng), zoom);
On Mon, May 16, 2011 at 1:59 AM, Andrew Leach <[email protected]>wrote:
> On May 15, 2:49 pm, ss ss <[email protected]> wrote:
> > Dear Andrew,
> > I have solved it with the left zero value. I dont
> quite
> > understand how to tell the map the resize have happen to the tiling will
> be
> > fine? Once my div is 100% will be automatically done?
>
> No: you have to tell the map to recalculate its size.
>
> http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMap2.checkResize
>
> > Any idea on this
> > "probably recentre the map so it looks like the edges have expanded
> rather
> > than the div has been moved".
>
> You need to work out the centre pixel of your map, find its geographic
> location, resize the map (including the checkResize) and then re-
> centre it to the location you found.
>
> http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMap2.fromContainerPixelToLatLng
>
> > I am also trying to solve the last problem on
> > Terms. Can relocate the terms to another location?
>
> You can't relocate the Terms link. You can reposition your control to
> avoid it.
>
>
> http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GControl.getDefaultPosition
>
> http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GControlPosition
>
> http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GSize
>
> --
> 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.
>
>
--
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.