From 8025db5b1547c7b4fe8262173156949849be148e Mon Sep 17 00:00:00 2001 From: silvio <silvio@633548.no-reply.drupal.org> Date: Mon, 1 Apr 2013 18:56:24 +0300 Subject: [PATCH] Issue #1954740 by silvio: Added method to get infowindow variable. --- js/marker.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/marker.js b/js/marker.js index fa3cba5..1f58e06 100644 --- a/js/marker.js +++ b/js/marker.js @@ -10,7 +10,7 @@ Drupal.gmap.addHandler('gmap', function (elem) { var obj = this; - var infowindow = null; + var infowindow = new google.maps.InfoWindow(); obj.bind('init', function () { if (obj.vars.behavior.autozoom) { @@ -69,7 +69,6 @@ Drupal.gmap.addHandler('gmap', function (elem) { if (infowindow != null){ infowindow.close(); } - infowindow = new google.maps.InfoWindow(); if (marker.text) { infowindow.setContent(marker.text); infowindow.open(obj.map, marker.marker); @@ -154,5 +153,9 @@ Drupal.gmap.addHandler('gmap', function (elem) { } }); + Drupal.gmap.getInfoWindow = function() { + return infowindow; + }; + // @@@ TODO: Some sort of bounds handling for deletemarker? We'd have to walk the whole thing to figure out the new bounds... }); -- GitLab