Augmenter Google Map Info taille de la fenêtre
-
26-10-2019 - |
Question
J'ai une carte google.
Et il y a une fenêtre d'information.
Maintenant, la taille est standard et il r charge de textes à l'intérieur.
Alors, mon patron m'a demandé d'augmenter.
Nous useing ektron CMS
et donc je dois aller dans ektron workarea
et modifier map.js
Même si elle est ektron
, il utilise encore google map.
Je réussi à savoir quelle partie affiche comme fenêtre d'information.
Ceci est la partie du code où la fenêtre d'information apparaît et les informations d'affichage à l'intérieur.
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);
}
});
J'essaie de lancer une recherche sur Google et a trouvé que c'est de savoir comment un gars a essayé de changer la taille de la fenêtre d'information.
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);
}});
});
L'article complet est sur ce site .
Mais je ne peux pas les fusionner en 1.
en particulier ce type utilise map.openInfoWindowHtml()
avec 3 paramètres et ektron
utilise marker.openInfoWindowHtml()
avec un seul paramètre.
Toute idée comment y parvenir? Tkz beaucoup.
.. Je suis très nouveau pour google map. Alors, pardonnez-moi si ma question est de perdre votre temps.
La solution
Peut-être que cette réponse est trop simple, mais avez-vous deja essayé de modifier cette ligne dans le openInfoWindowHTML () appel?
style="overflow:auto;width:240px;height:100px;">