Theming google map popups to use imagecache with Views and GMap module in Drupal
So you can pass in the imagecache presets namespace directly into your GMap view for use in pop-ups.
I had (apparently) figured this out a while ago but had Dan going through the code print_r'ing views variables to try to figure out where we could intercept the file ID and change the path to imagecache... and the path was already imagecache.
Any imagecache type you create can be chosen for CCK image
Moral of the story, when you're dealing with Views, assume it can be done through the user interface. There is full and amazing Imagecache support of Views.
As for the rest, you pretty much can just do it with CSS on ".gmap-popup" which is applied to each line.
Can't figure out where on earth the code for the popup itself, the talk bubble style thing, comes from. I guess direct from Google.
Here's some CSS in progress by Dan:
<pre>
.gmap-popup {
font-size: 10px;
}
.gmap-popup.latitude,
.gmap-popup.longitude
{
display: none;
}</pre>
And here's the field class for the picture, in our case called action shot (the imagefield, not the imagecache preset, is what is used here).
gmap-popup field_action_shot_fid
.gmap-popup.field_action_shot_fid { }
Comments
Post new comment