2

I am using the OpenLayers module and it appears that I can add a popup and a tooltip behaviour if a users clicks or hovers over a marker on a map, but I only need users to be able to click the marker to go to the node (no popups). Is there a config I am missing to do this?

  • I'll see if I can spin up a OL site later, but from previous dealings with the OL module, I believe that what you need is really a new OL layer, and creating that is almost entirely out of Drupals domain. All Drupal can do is load your code with the appropriate hook, and pass it on to OL, so unfortunately, I don't believe you're asking in the right forum. (Drupal tpls over the map would be really nice, but I don't think that's supported by the OL module) – Letharion Nov 26 '12 at 18:44
  • I am thinking there must be a token in my view that I can pass to externalGraphic url field of my OL style. drupal.org/node/1585880 – Nigel Waters Nov 27 '12 at 4:28
4
+250

Usually jumping to new page just by clicking object is not what users want, as they need to be sure first that the clicked object is correct one, this is why there is no built-in function and you do not see this much in the wild.

OpenLayers module has behaviours for this kind of actions. It seems that the core module does not have what you expect, and nobody has done it yet, so no easy configuration option :( Here is the guide how to create new behaviours from scratch. I would use Popup behavior as sample.

  • I agree with with JaakL, that it is kind of 'drastic', however, you might offcourse have good reason for it. But if you would choose to allow the popup, you can easily add a field there that links to the node detail. – Vodde Nov 30 '12 at 16:34
  • In many use cases I would agree with this. However in this particular use-case a marker is shown on available cities for users to choose from. There is a limited number of them and it is evident to the user that they will be redirected to the city of their choosing by clicking the marker. Popups are an unnecessary extra step for users to get to where they want to go. Popups also have a known bug in them that really make the UI inconsistent. So, disabling them is preferred by the client. drupal.org/node/605170 – Nigel Waters Dec 5 '12 at 18:01
0

Excellent use case, given popups are bad for mobile UI. A marker makes a great button, and jumping to the page from that button is expected behavior in some scenarios.

You should consider the Geolocation Views module, if you're using Google maps.

  • As mentioned above, I am using OpenLayers and switching to geolocation field and views is not an option at this point. I am in too deep using OL and there is no turning back. – Nigel Waters Jan 4 '13 at 18:04
  • I'd like this too. Have you had any luck Nigel? – Meggy Jun 23 '15 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.