HI. Great Module.

May be way ahead of what the d7 version is capable of, but I tried to create a multiple location map using views. Instead of Node: Marker (Which was not available at this time, probably due to the way Taxonomy is now introduced to nodes), I created a Taxonomy vocab, assigned it to Location, added a custom set of markers (much like the setup in d6) and used that taxonomy term in fields in place of the Node Marker (since it was not available)

Anyhow. The map comes up and I receive a Javascript window stating

Request for invalid marker set 11!

Anyhow, no markers show up in the views map.

Using Location 7.x-3.x-dev (as of 2/7/11), Node Locations 7.x-3.x-dev along with GMap 7.x-1.x-dev, GMap Location 7.x-1.x-dev, GMap Macro Builder 7.x-1.x-dev, and GMap Taxonomy Markers 7.x-1.x-dev

Am I missing something? Should the Node Marker vocabulary be accessible in the Location nodes, or by adding a field in the content type in d7?

Would appreciate any feedback.

CommentFileSizeAuthor
#3 gmap_field_alias.patch885 byteszoen

Comments

sebish’s picture

I know it won't be helpful bur I have the same issue here.

zoen’s picture

I have a similar problem - trying to use the "Marker field" option. I find that, whatever field I specify, I get a JS popup warning "Request for invalid marker set [nid]!", where [nid] is the nid of one of the nodes to display.

The good news: I've tried, and yes, if I create custom marker sets named after all my node IDs, it works. So it looks like the only problem is that the node ID rather than the field value is being passed to... whichever function does the marker handling.

Still digging around, will post again if I come up with a solution.

zoen’s picture

StatusFileSize
new885 bytes

I'm not sure if the problem is with Views or Gmap. I'm using Gmap 7.x-1.x-dev and Views 7.x-3.x-dev.

In the render() method of the gmap_plugin_style_gmap class in gmap_plugin_style_gmap.inc, we try to get the alias of the marker field by doing:

$marker_field_obj = $this->view->display_handler->get_handler('field', $this->options['markerfield']);
$marker_field = $marker_field_obj->field_alias;

If the field is a text field (haven't tested other field types), the field alias we get out of this is always nid. That's bad - we want and need something like field_field_[myfieldname]. So then further down the render(), when we try to assign the field's value to $markername, we unintentionally assign the node nid. That means that our JS (Drupal.gmap.getIcon in gmap/js/icon.js) will be looking for a marker named after the nid of each node in our gmap view.

This is what causes the oft-seen problem with the JS popup warning: "Request for invalid marker set [some integer]!" It looks for a marker named after the nid of the first node it processes, then gives up.

I have hacked gmap_plugin_style_gmap.inc until it does what I need; attached as a patch. It works well enough for my purposes (using a text list field as a marker field), but may not help with using taxo, user or anything else as a marker field.

dafeder’s picture

dandaman’s picture

Status: Active » Needs review

I disagree that this is a duplicate. This has nothing to do with Taxonomy, this is for CCK fields. And the patch in #3 fixed my problem with it not correctly processing the "Use marker field" option.

ditcheva’s picture

Having the same issue here. The patch doesn't work for me. I'm using a taxonomy field as my marker field, and am still getting the 'Request for invalid marker set' error. More specifically

'Request for invalid marker set Southeast!'

Will have to start digging in the code now...

markabur’s picture

#3 works for me, using a text list field for the marker field.

podarok’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs review » Fixed

#3 commited / pushed to 7.x-2.x

thanks!

Status: Fixed » Closed (fixed)

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