Is there a way to show markers on the user map for some roles only?
I am thinking that in the "Markers per role" section of the GMap Location settings, each role drop-down would include a "- No marker -" option.

Comments

drupal92037’s picture

Subscribe. Looking for the same thing.

For now I came up w/ a kludge:
1) I created a new icon (per GMap Advanced Help) with the internal name "nomarker".
2) In markers.js, in function definition for addmarker, I inserted a line to just end the function call if the marker name is 'nomarker'.

  obj.bind('addmarker', function (marker) {
        if (marker.markername=='nomarker') return;

Seems to work ok so far.

FWIW.

caschbre’s picture

@drupal92037... I was attempting the same thing, however I'm stuck on the create new icon step. Did you actually create an icon or just make an .ini file? I'm trying to figure out how exactly to make the ini file.

So what I tried was the following...

I noticed there was a "Blank" marker. It had an actual light red normal icon. I modified the marker.js file as follows...

obj.bind('addmarker',function(marker) {
  if (marker.markername=='Blank') return;    // This it he line I added
  var m = Drupal.gmap.factory.marker(new GLatLng(marker.latitude,marker.longitude), marker.opts);

However that did not seem to work for me.

johnv’s picture

Status: Active » Closed (won't fix)

Closing this very old issue. Please reopen if it is still valid.