1

I have a google map.

And there's an information window.

Now the size is standard and there r loads of texts inside.

So, my boss asked me to increase it.

We are useing ektron CMS and thus I need to go into ektron workarea and edit map.js

Even if it is ektron, it is still using google map.

I managed to find out which part is displaying as info window.

This is the part of code where info window pops up and display information inside.

marker = new GMarker(point, icon);
var infoWindow = map.getInfoWindow();
GEvent.addListener(marker, "mouseover", function () {
                    if (EMap.SearchData != 'content') {
                        if (qlink && qlink.length > 0) {
                            _userTB = '<span>' + title + '</span>';
                        }
                        else {
                            _userTB = title;
                        }
                        var theHtml1 = '<div id="IW_' + markerid + '" style="overflow:auto;width:240px;height:100px;">' + markerid + '. ' + _userTB + _summarytxt + '<br/>' + EGlobal.Format(EMap.Geolocation, new Array('javascript:EMap.SetAddress(\'' + EGlobal.Replace(address, '#', ' ') + '\',\'to\');', 'javascript:EMap.SetAddress(\'' + EGlobal.Replace(address, '#', ' ') + '\',\'from\');')) + '</div>';
                        map.openInfoWindowHtml(theHtml1);
                    }
                    else {
                        var theHtml2 = '<div id="IW_' + markerid + '" style="overflow:auto;width:240px;height:100px;">' + markerid + '. <span><b>' + title + '</b></span><br/>' + _summarytxt + '<br/>' + EGlobal.Format(EMap.Geolocation, new Array('javascript:EMap.SetAddress(\'' + EGlobal.Replace(address, '#', ' ') + '\',\'to\');', 'javascript:EMap.SetAddress(\'' + EGlobal.Replace(address, '#', ' ') + '\',\'from\');')) + '</div>';
                        marker.openInfoWindowHtml(theHtml2);
                    }
                });

I try to search on google and found out that this is how a guy tried to change the info window size.

var infoWindow = map.getInfoWindow();
var point = new GLatLng(0,0);
var marker = new GMarker(point);
GEvent.bind(marker,”click”,marker,function() {
    map.openInfoWindowHtml(this.getPoint(),this.address,{onOpenFn:function(){
        infoWindow.reset(this.getPoint(),infoWindow.getTabs(),new GSize(200,200),null,null);
    }});
});

The full article is on this site.

But I cannot merge them into 1.

especially that guy is using map.openInfoWindowHtml() with 3 parameters and ektron is using marker.openInfoWindowHtml() with only one parameter.

Any idea how to get this done? Tkz a lot.

And.. I am very new to google map. So, forgive me if my question is wasting your time.

Tomas
  • 57,621
  • 49
  • 238
  • 373
william
  • 7,284
  • 19
  • 66
  • 106

1 Answers1

1

Maybe this answer is too simple but did you allready tried to edit this line in the openInfoWindowHTML() call?

style="overflow:auto;width:240px;height:100px;">
Tieme
  • 62,602
  • 20
  • 102
  • 156
  • 1
    Yes, that is the answer. I overlooked coz.. when I tried changing that line, in firebug, only the `
    ` became bigger. But when I changed in `js` the whole info window became bigger.
    – william Dec 01 '11 at 00:16