So this enables the display of the role specific gmap markers (as set in admin/settings/gmap_location) in all gmap styled views. Previously there were only options for 'node type', 'taxonomy' and 'single default' markers.

I don't have a CVS account and am new to this whole process so if someone could put the code changes into a patch that would be great. I'm also looking for any feedback since this is literally my first attempt at module modification. This seemed pretty simple though.

OK...so..

On line 135:

         'userrole' => t('By User Role (for User views)'),

On line 85:

          else if ($this->options['markers'] == 'userrole') {
             if (!empty($row->gmap_role_marker)) {
               $markername = $markertypes[DRUPAL_AUTHENTICATED_RID];
                 if ($row->gmap_role_marker && isset($markertypes[$row->gmap_role_marker])) {
                   $markername = $markertypes[$row->gmap_role_marker];
                 }
             }
           }          

On line 61:

     else if ($this->options['markers'] == 'userrole') {
       $markertypes = variable_get('gmap_role_markers', array(DRUPAL_AUTHENTICATED_RID => 'drupal'));
     }

On line 47:

     else if ($this->options['markers'] == 'userrole') {
       $this->view->query->add_field('users_roles', 'rid', 'gmap_role_marker');
     }

Now goto the Gmap style options of your view and select 'By User Role'.
Checkout the attached file in case I screwed up a line number or something.

Steve

CommentFileSizeAuthor
gmap_plugin_style_gmap.inc_.txt5.43 KBAnonymous (not verified)

Comments

bdragon’s picture

Status: Needs review » Fixed

Whoops, was going to commit this earlier and forgot.

Thanks, committed.

http://drupal.org/cvs?commit=169395

Status: Fixed » Closed (fixed)

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