I've been trying to hide Latitude&Longitude, but without success.
I've been able with css to hide the whole pop-up with the following code:

.gmap-popup {display:none;}

but I'm not able to select correctly the latitude and longitude classes.

The following code will not work:

.gmap-popup latitude {
display:none;
  }

Why?

I even tried changing the paragraph color with this code:

.gmap-popup p {
color:#cc00;}

What's wrong with my css selectors?

Comments

Mike Sances’s picture

I'm also trying to accomplish something similar. I'm creating a gmap view but want to exclude the longitude and latitude, but get an error message:

GMap View requires: either "Location: Latitude" and "Location: Longitude" or a field titled "Latitude" and a field titled "Longitude"

On my Drupal 4.7 sites, I am able to create views without longitude and latitude with no problem.

Mike Sances’s picture

duplicate post

Mike Sances’s picture

duplicate post

comargo’s picture

correct CSS code is

.gmap-popup.latitude ,
.gmap-popup.longitude
{
  display: none;
}

Please note, there is no space between '.gmap-popup' and '.latitude'

ultimike’s picture

Another way to do it without CSS is to just create your own theme function:

function mytheme_gmap_views_marker_label($view, $fields, $entry) {
  $marker_label = '<div class="gmap_popup">';
  foreach ($view->field as $field) {
    switch ($field['field']) {
      case 'title':
      case 'comment_count':
        $marker_label .= '<div class="'. $field['field'] .'"><span class="field-title">'. $field['label'] . '</span> ' . views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $entry, $view) .'</div>';
      break;
      
      case 'name':
        $marker_label .= '<div class="'. $field['field'] .'"><span class="field-title">'. $field['label'] . ':</span> ' . views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $entry, $view) .'</div>';
      break;
      
      default:
      break;
    }
  }
  return $marker_label . '</div>';
}

In this example, I only output the title, comment count, and name. The latitude and longitude are still part of the view, just not displayed.

-mike

thechraveler’s picture

yes I am also curious why this addition from the 4.7 module?

rooby’s picture

Priority: Critical » Normal
Status: Active » Closed (won't fix)

Drupal 5 is no longer supported.

Also,
Support and feature requests are not critical. For more information see http://drupal.org/node/45111