Chúng tôi đã có cùng một yêu cầu trong một dự án gần đây. Nó đã được giải quyết bằng javascript, không có cách nào khác để làm điều này.
Vui lòng xem https://www.transpower.co.nz/projects
Đây là một số mã để giúp bạn bắt đầu:
(function ($, Drupal, window, document, undefined) {
  // ...
  $(function(){
    if($(".not-front .openlayers-map").length && !$('.node-type-project').length) { // only run when there is actually a map on the page, but not on the home page
      if ($('body').hasClass('page-community-initiatives')) {
        is_ci = true;
      }
      mapData = $(".openlayers-map").data('openlayers').openlayers;
      pointLayers = mapData.getLayersByClass("OpenLayers.Layer.Vector");
      // cycle through all layers and points on those layers, adding the points to an array
      for (var i in pointLayers) {
        for (var j in pointLayers[i].features) {
          pointData.push(pointLayers[i].features[j]);
        }
      }
      // if we've pulled out some points, go make a list
      if (pointData.length) {
        makeList(pointData, ".pane-openlayers-map");
      } else {
        $('.pane-openlayers-map').append('<div class="no-results"><p>Your search returned no results, please try again.</p></div>')
      }
      // add event listener to the map to be fired whenever the user interacts with it.
      // calls refreshList function above
      mapData.events.on({
        "moveend": refreshList
      });
      Drupal.openlayers.popup.popupSelect.events.on({
        "featurehighlighted": popupOpen,
        "featureunhighlighted": popupClose
      });
    }
  });
})(jQuery, Drupal, this, this.document);
Toàn bộ tệp JS có thể được tải xuống (chưa hoàn thành) từ chủ đề . Hãy thay đổi cho phù hợp với nhu cầu của bạn.