The popup does not display a description for some features. The css file also has unnecessary comments and specific references to ids and classes that may not exist universally.

Comments

davidserene’s picture

davidserene’s picture

Status: Needs review » Fixed
batje’s picture

+++ b/behaviors/openlayers_plus_behavior_popup.js
@@ -154,7 +154,10 @@
         text += "<div class='popup-content'>" + feature.attributes.field_description + "</div>";
       }else if (feature.attributes.description != undefined) {
         text += "<div class='popup-content'>" + feature.attributes.description + "</div>";
+      }else if (feature.attributes.body != undefined) {
+        text += "<div class='popup-content'>" + feature.attributes.body + "</div>";
       }
+      ¶
       text += "<div class='popup-pager'><ul class='links popup-links'><li><a class='prev' href='#prev'>Prev</a></li><li><a class='next' href='#next'>Next</a></li></ul><span class='count'></span></div>";
       $('.openlayers-popupbox', context).html(text).show();
       Drupal.attachBehaviors($('.openlayers-popupbox', context));
@@ -168,7 +171,7 @@

@@ -168,7 +171,7 @@
         if (feature.attributes.name) {
           var text = "<div class='openlayers-popupbox'>";
           text += "<h2 class='popup-title'>" + feature.attributes.name + "</h2>";
-          text += "<div class='popup-count'>" + parseInt(feature.attributes.count, 10) + "</div>";
+          //text += "<div class='popup-count'>" + parseInt(feature.attributes.count, 10) + "</div>";
           text += "</div>";

Why is the first statement conditional (which is good) and the second one commented out (which has potential?)

davidserene’s picture

The first statement is conditional because the description is sometimes not included by users; also am not sure why but the value for the popup description is at various times found in the feature.attributes.field_description, feature.attributes.description or feature.attributes.body. I commented out the count because its dependencies, the previous and next pagers are not yet fully functional in the popup behavior.

batje’s picture

Status: Fixed » Needs work

What is the issue number for the issue with the non-functional pager controls?

davidserene’s picture

The issue number is 2033795, here's a link to the issue https://drupal.org/node/2033795

davidserene’s picture

Status: Needs work » Needs review

There is a patch available at https://drupal.org/node/2033795#comment-7615021 to fix the pagers on popups for clustered features.

davidserene’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.