From 4c5dc687af4c321b55303106b4a10bb55babb0a9 Mon Sep 17 00:00:00 2001 From: "runxc1(Bret Ferrier)" Date: Wed, 9 Oct 2013 14:39:05 -0600 Subject: [PATCH] Update ui-map.js placing the map inside of a ng-if breaks the infowindow if it is cashed on the scope as the map will be a new instance the 2nd time the map is shown --- ui-map.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ui-map.js b/ui-map.js index 33e377d..fa1ed77 100644 --- a/ui-map.js +++ b/ui-map.js @@ -54,12 +54,9 @@ var opts = angular.extend({}, options, scope.$eval(attrs.uiOptions)); opts.content = elm[0]; var model = $parse(attrs.uiMapInfoWindow); - var infoWindow = model(scope); + var infoWindow = new google.maps.InfoWindow(opts); + model.assign(scope, infoWindow); - if (!infoWindow) { - infoWindow = new google.maps.InfoWindow(opts); - model.assign(scope, infoWindow); - } bindMapEvents(scope, infoWindowEvents, infoWindow, elm);