I actually wrote about this years ago... I have some code that worked
at that time.
You need to change the height and top on 7 divs. Apparently This was
during my YUI days, so that's how I got a reference to them, you'll
need to grab them however you can and force the heights and tops.
var infoWindow = map.getInfoWindow();
var point = new GLatLng(0,0);
var marker = new GMarker(point);
GEvent.bind(marker,”click”,{marker:marker,address:address},function()
{
map.openInfoWindowHtml(this.marker.getPoint(),this.address,
{onOpenFn:function(){
/* Google Maps API does not support any way to resize the
infoWindow, this is my hack.
* There is no CSS class to manipulate these divs and the
infoWindow.reset method
* CAN be used to increase the size but not to make it
smaller.(min
height is about 60px).
*/
var infoWindowBlocks =
YAHOO.util.Selector.query(’#area-map-tool div
div div div’);
for(var c = 0; c < infoWindowBlocks.length; c++){
if(infoWindowBlocks[c].style.height === "40px" &&
infoWindowBlocks[c].style.top === "25px"){
infoWindowBlocks[c].style.height = "10px";
}
if(infoWindowBlocks[c].style.top === "65px"){
infoWindowBlocks[c].style.top = "35px"
}
}
}});
});
You can check out my post here, just ignore the spammers. I don't
maintain the blog anymore.
http://claytonrabenda.com/web-development/how-to-change-size-of-infowindow-in-google-map-with-api
On May 16, 4:13 pm, Barry Hunter <[email protected]> wrote:
> Customizeable info windows are available vai the Utility Library
>
> http://code.google.com/p/gmaps-utility-library-dev/
>
> (Note, this is the group for v2, which is scheduled to be turned off
> in a year. You really should be using v3 now!)
>
> https://developers.google.com/maps/forum
>
> On Wed, May 16, 2012 at 2:47 PM, Cleiton Maciel
>
>
>
>
>
>
>
> <[email protected]> wrote:
> > How can I reduce the size of the maps info window? I have one that
> > loads an HTML, butmuch space is left on the right side and bottom. How do
> > you reduce this window, does anyone know?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Maps API V2" group.
> > To view this discussion on the web visit
> >https://groups.google.com/d/msg/google-maps-api/-/rca7I_tEG54J.
> > 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.