Closed (fixed)
Project:
GMap Module
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Feature request
Reporter:
Anonymous (not verified)
Created:
1 Feb 2009 at 16:19 UTC
Updated:
5 Feb 2015 at 04:49 UTC
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
| Comment | File | Size | Author |
|---|---|---|---|
| gmap_plugin_style_gmap.inc_.txt | 5.43 KB | Anonymous (not verified) |
Comments
Comment #1
bdragon commentedWhoops, was going to commit this earlier and forgot.
Thanks, committed.
http://drupal.org/cvs?commit=169395