The help text on the map edit form for the "Hide empty map for Views" option states: "Show views empty text or hide the map if there are no map overlays with features. Otherwise an empty map is displayed." But in my testing, with latest dev, the Views no results behavior is not triggered when there are no results. Instead, if this option is selected, nothing is displayed. If it is not selected, an empty map is shown.

Comments

thechumley’s picture

Status: Active » Needs review
StatusFileSize
new2.06 KB

This patch should fix this. When "Hide empty map for Views" is selected, the view will now render the items configured in the "no results behavior" section of the view configuration (if any). Tested with the "Global: Text Area" format for no-results.

pol’s picture

Status: Needs review » Needs work
+++ b/modules/openlayers_views/views/openlayers_views.views.theme.incundefined
@@ -13,6 +13,6 @@
     '<div class="openlayers-views-map">'
-    . $args['map']
+    . isset($args['map']) ? $args['map'] : ''

Should we display the divs even if there is no map ?

okeedoak’s picture

My vote is no, don't display the divs.

fluffy’s picture

The patch in #1 did not work, the Views still displays the view even if there are no results.

fluffy’s picture

Status: Needs work » Closed (duplicate)