Hello, I have set up a map with lots of locations and originally had it set up so that clicking on a marker linked straight to the node. Now I want to have it bring up an info window with the node title and first image from the cck imagefield. Most of this is set up perfectly with a clickable link and clickable image. However the container for the info window doesn't expand to include the image (see attached). The image in the view field is an imagecache thumbnail.
You can view the map here if you like:
http://www.phanaeinionline.co.uk/species_map
Some markers won't bring up images as not all nodes have images yet.
Is it possible to get rid of the latitude and longitude? Presumably they need to be included in the view fields so that it can actually map the markers, but I don't really want them showing in the info window.
Many thanks
Matt
Comment | File | Size | Author |
---|---|---|---|
#7 | short-bubble.png | 67.08 KB | greg.harvey |
infowindowproblem.jpg | 135.75 KB | matthew_ellis24 |
Comments
Comment #1
BWPanda CreditAttribution: BWPanda commentedMarked http://drupal.org/node/371326 as a duplicate of this issue. Also changed version to 6.x-1.x-dev as it still happens there.
I'm having the same problem, and I think it's because the height of the windows are calculated before the image loads (hence my request for preloading content).
This can be tested by clearing your browser cache, then viewing an info window with an image (it will appear as per your screenshot). If you then close the info window and open that same one again, because the image is now in your browser's cache, the window should expand to include the whole image.
Just need someone to work out how to preload info window content, or not calculate window dimensions before images have fully loaded...
As for getting rid of the Lat/Long values, you simply choose not to display them (even though they're included in the view, they don't have to actually appear...)
However, as you're using Views 1, I'm not sure if this is possible. You may need to create a custom .tpl.php file and hide the fields using that. Failing all else, you can just use CSS to
display: none;
the Lat/Long fields.Hope that helps!
Comment #2
chaloalvarezj CreditAttribution: chaloalvarezj commentedsubscribe
Comment #3
matthew_ellis24 CreditAttribution: matthew_ellis24 commentedall of my images are the same height so I tried to enforce a height on the window using CSS using the class gmap-popup. However this gives each of the elements within it that height rather than the applying it to the window itself. Further attempts to do anything with CSS seem to be thwarted by me not knowing what I'm doing as the classes field_images_fid and title and latitude/longitude seem to be ignored.
Comment #4
chaloalvarezj CreditAttribution: chaloalvarezj commentedChanged the title as this issue is not only for images but for the entire info window content.
The latest 6.x.1.1-rc1 has the same bug.
Any workaround?
Comment #5
chaloalvarezj CreditAttribution: chaloalvarezj commentedComment #6
greg.harvey+1 on this!
Also seeing this issue, "bubbles" are not expanding to take all the CCK fields exposed in a GMap view. They always seem to be about 20px too short. Had a look at the code, but it's complicated and I don't have time right now to try and work out how/where the dimensions are being generated. =(
Comment #7
greg.harveySee attached screenshot for reference. As I add more fields, it does grow but is always a little too small. The bottom is not being drawn in the right place.
Comment #8
chaloalvarezj CreditAttribution: chaloalvarezj commentedHi there,
I found a temporary solution when displaying the teaser inside the info window.
I added a div tag of about 50 px height after all the fields (adding two p tags also worked). This workaround was good for firefox and ie but not for safari.
Still waiting for a definitive solution...
Cheers
Comment #9
greg.harveyThanks! Neat temporary workaround - didn't think of that. =)
Comment #10
joostvdl CreditAttribution: joostvdl commented+1
Comment #11
cm983 CreditAttribution: cm983 commentedhey guys where do you put the div or the p tag exactly - im having the same issue also . not all the fields entered are showing up . especially the title field which is th e most important for me
Comment #12
daytripscanada CreditAttribution: daytripscanada commented+1 same issue at http://www.day-trips.ca/map/node
Comment #13
daytripscanada CreditAttribution: daytripscanada commentedHas there been any progress made on this issue?
Comment #14
pbarnett CreditAttribution: pbarnett commentedNot as far as I'm aware; I was sure that the 'adding a div/break/whatever' route looked like a workaround until I realised that the images were cached by my browser when I changed the code, and the uncached page still had popups that looked like cr@p - I worked around the issue with images in a D5.x Views 1 page by overriding theme_views_view_gmap with phptemplate_views_view_gmap in my theme's template.php file, and adding the images wrapped in a div styled like this
to the output before returning theme('gmap', $thismap)
It's a bodge, not a fix, but it works - see http://mongolia.charityrallies.org/teams/members/map/gb
Surprisingly, there didn't seem to be too much of a performance hit, even with an empty cache, but I'm still playing with this...
Image of original broken behavior at http://mongolia.charityrallies.org/sites/all/files/Screenshot-33.jpg
Pete.
Comment #15
Carlos Miranda Levy CreditAttribution: Carlos Miranda Levy commentedsubscribe
Comment #16
thedrupaluser CreditAttribution: thedrupaluser commentedsubscribe
Also, has there been any further progress, or any suitable workarounds? I.e., any that actually work, no matter how temporary? Thanks
Comment #17
pbarnett CreditAttribution: pbarnett commentedMy technique of effectively preloading the images works; I've not seen anything else...
Pete.
Comment #18
GiorgosKNo need for pre caching the imagecache images
if you know the size of the image to be displayed use something like this in your css
where
thumbnail
is the name of the imagecache field to be displayedusing drupal 6 version of module
Comment #19
bramley CreditAttribution: bramley commentedThis is a problem for me with node teaser content. The Content is consistently the same amount larger than the info window.