vendor/assets/javascripts/map.js in flashgrid-2.2.0 vs vendor/assets/javascripts/map.js in flashgrid-2.2.5

- old
+ new

@@ -94,16 +94,18 @@ var arrayToLatLng = function(coords, useGeoJSON) { var i; for (i = 0; i < coords.length; i++) { - if (coords[i].length > 0 && typeof(coords[i][0]) == "object") { - coords[i] = arrayToLatLng(coords[i], useGeoJSON); + if (!(coords[i] instanceof google.maps.LatLng)) { + if (coords[i].length > 0 && typeof(coords[i][0]) == "object") { + coords[i] = arrayToLatLng(coords[i], useGeoJSON); + } + else { + coords[i] = coordsToLatLngs(coords[i], useGeoJSON); + } } - else { - coords[i] = coordsToLatLngs(coords[i], useGeoJSON); - } } return coords; }; @@ -363,9 +365,12 @@ options[name].apply(this, [e]); self.hideContextMenu(); }); }; + + //google.maps.event.addListener(this.map, 'idle', this.hideContextMenu); + google.maps.event.addListener(this.map, 'zoom_changed', this.hideContextMenu); for (var ev = 0; ev < events_that_hide_context_menu.length; ev++) { var name = events_that_hide_context_menu[ev]; if (name in options) { \ No newline at end of file