In the configuration page: admin/config/services/gmap

I chose 'open link' in marker action sub-menu, but it doesn't work.

When I click on a marker, nothing happens!

Comments

calmforce’s picture

I got similar problem - no reaction to a click on a marker in a view with output style GMap. No tooltip either on mouse hover. Is it specific to views?

118218’s picture

No I do not even use views.

I had this bug with several sites. So I managed to solve it using a CSS hack.

So I take the Google link at the bottom left, and I make sure it takes the entire surface of my gmap display. For that I use the CSS rule -> display: block

118218’s picture

We can customize the behaviour of the gmap marker when clicked, by editing the function theme_gmap() on gmap.module file:

if (isset($map['markers'])) {
    foreach ($map['markers'] as $i => $marker) {
      if (isset($marker['text'])) {
        $map['markers'][$i]['text'] = '<div class="gmap-popup">' . $marker['text'] . '</div>';
      }
    }
  }

I managed to disable popup (info window) by editing it this manner:

if (isset($map['markers'])) {
    foreach ($map['markers'] as $i => $marker) {
      if (isset($marker['text'])) {
        $map['markers'][$i]['text'] = '';
      }
    }
  }

Thanks to this post:

https://drupal.org/node/753768

podarok’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Category: bug » task
Status: Active » Patch (to be ported)

#3 looks like ready for git diff http://drupal.org/patch

podarok’s picture

Issue summary: View changes

syntax corrections

valentine94’s picture

Issue summary: View changes
Status: Patch (to be ported) » Needs review
StatusFileSize
new439 bytes

Created a patch with a #3 solution.

andypost’s picture

+++ b/gmap.module
@@ -998,7 +998,7 @@ function theme_gmap($variables) {
     foreach ($map['markers'] as $i => $marker) {
       if (isset($marker['text'])) {
-        $map['markers'][$i]['text'] = '<div class="gmap-popup">' . $marker['text'] . '</div>';
+        $map['markers'][$i]['text'] = '';

unset($map['markers'][$i]['text']) looks better then condition

valentine94’s picture

StatusFileSize
new441 bytes

Wrong.

valentine94’s picture

StatusFileSize
new484 bytes

@andypost, do you mean something like this?

andypost’s picture

Status: Needs review » Reviewed & tested by the community

yes, this ugly but works, probably needs manual testing

System Lord’s picture

I manually plugged this change into 729 and it works (including android). I can't revert back to DEV so my only option.

Just need to remove the pointer on hover.

Thanks for this!

valentine94’s picture

Title: The marker acrtion 'open link' does not work » The marker action 'open link' does not work

Fix typo in the issue title.

podarok’s picture

Status: Reviewed & tested by the community » Fixed

  • podarok committed 7014219 on 7.x-2.x authored by Valentine94
    Issue #1541324 by Valentine94, andypost: The marker action 'open link'...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

malberts’s picture

Status: Closed (fixed) » Needs work

This breaks the popup window because this patch removes the actual popup text.

Or should I open a new issue?

cspiker’s picture

Yes, this commit breaks the info popup window. See #2445429: Bubbles missing from gmap view.

summit’s picture

Hi,
Yes somehow this issue, and issues https://www.drupal.org/node/2445429 and https://www.drupal.org/node/2478267 are three bugreports of the same sort of functionality wish. to get gmap markers working as in D6, with tooltip, bubble, balloon, click event as settings give action to.
Gmap marker is right now in .dev and in latest version not working as it should be.
I will build a new issue as overall issue of these combined issues.
greetings, Martijn