Using http://drupal.org/project/geocoder (dev), and using Geofield map in all cases - no Open Layers. Let me know if these should be separate issues and I will create them.

First, popups do not happen when assigning a node's field to a page panel. There is no setting for CTools to assign a field and nothing happens on click of a marker. I can get around this by using a view in the context of the node (og group in my case) for the field, so this is more of a feature request.

Second, in a view, is there a way to assign more than one field to use in the popup? For example, I would like to have the node title and address in the popup.

Last and least, the geofield_map.js (line 79) hard codes 'test' for the value of all marker's title attribute. I looked in geofield_map.module, and it doesn't look like a simple thing to fix. I know I want my field (an addressfield) and its name_line item or the node's title, but of course that will be different for most use cases. Maybe remove it or set it to an empty string?

CommentFileSizeAuthor
#4 1345434.patch1.33 KBnnotario

Comments

Brandonian’s picture

Thanks for the bug report/feature request, RobKoberg. In general, the Geofield Map module is really intended for rapid prototyping or very simple use cases. The best bet for handling more complicated setups is to use the Openlayers module for mapping integration.

That being said, I'll try to address each point.

  • No Popup on click - I can't replicate this on my local dev install. When a popup field is assigned in the views display settings, I'm getting the popup when you click a marker. Google Maps doesn't really provide a good way to do info windows on non-marker features, though (See http://code.google.com/apis/maps/documentation/javascript/overlays.html#...). This could use better documentation on the part of the Geofield module.
  • Multiple fields in popup - I've had luck using a combination of custom text fields and tokens to get multiple fields in a popup.
  • "test" in marker attribute - This is an oversight, and definitely worth fixing. I'll make a note of it in the other cleanup issue #1346278: Make views integration for Geofield Map suck less.
RobKoberg’s picture

Hi and thanks for your time.

For bullet one, I am not talking about views. I am talking about assigning a field in a node/%node page manager pane. Not a view - views work. There is no UI to assign fields to the geofield field in a page manager pane. Perhaps this is just a fact of life issue.

For bullet two, how did you do that?

Thanks, -Rob

Brandonian’s picture

With Views fields, you can add a custom text field (under Global, I think). Within the custom field, you can add multiple tokens to display. For example, if you wanted to display fields foo and bar in custom field baz, you would use tokens [foo] and [bar] in the custom field. Keep in mind that you need to add both fields before your custom field in order for the tokens to display.

After that, all you have to do is use your custom field as the popup source in Geofield, and you're set.

nnotario’s picture

StatusFileSize
new1.33 KB

This patch will use the same text used for the popup in the tooltip, if no one is specified it will leave it blank (no more "test"). It will strip the tags from the text.

giorgio79’s picture

Added a feature request for views popup: #1510990: Views Geomap Display: Use fields in fields list inside popup It would make sense to show any field selected in the Views Fields list inside the popup.

Brandonian’s picture

Status: Active » Fixed

Closing ticket. Everything has either been addressed here or in the ticket linked in #5.

Status: Fixed » Closed (fixed)

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