Index: mapstraction_style_map.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mapstraction/mapstraction_style_map.inc,v
retrieving revision 1.1.2.13
diff -u -p -r1.1.2.13 mapstraction_style_map.inc
--- mapstraction_style_map.inc	11 Jun 2009 12:40:00 -0000	1.1.2.13
+++ mapstraction_style_map.inc	4 Sep 2009 14:22:39 -0000
@@ -100,6 +100,7 @@ class mapstraction_style_map extends vie
       '#title' => t('Behaviours'),
       '#options' => array(
         'hover' => t('Show info bubble on mouse hover'),
+        'preview' => t('Show results in preview (required to work with Panels 3)'),
       ),
       '#default_value' => $this->options['behaviours'],
     );
@@ -197,7 +198,13 @@ class mapstraction_style_map extends vie
   }
   
   function render() {
-    if ($this->view->preview == TRUE) {
+    // Work out if the display should be used during a View Preview.
+    // This is required to work with Panels3
+    $show_preview = FALSE;
+    if (isset($this->options['behaviours']['preview']) && $this->options['behaviours']['preview']) {
+      $show_preview = TRUE;
+    }
+    if ($show_preview == FALSE && $this->view->preview == TRUE) {
       return '<div class="messages error">Preview is disabled for the Mapstraction style plugin.</div>';
     }
     else {
