Posted by gmclelland on November 12, 2007 at 3:52pm
| Project: | GMap Module |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
I just upgraded to the Nov. 9th release and noticed that I couldn't change the icons for any content type. These settings are on the gmap location settings page. It looks like the icons on my maps are stuck using the red icon even if I change them to something else.
Can anyone else confirm this?
Thanks
Comments
#1
yes I can confirm this with some more detail
I have been working with gmap/location module. Specifically I have been testing the 5.x.1.dev branch.
I applied the Nov 8 release and found that the markers are no longer consistent.
From - /admin/settings/gmap_location
You can set the marker for each content type. I had created my own markers.
The markers work great from "map/node".
But they are not consistent with the markers used in the "location" block nor in gmap views.
I can find no way to affect the markers in "location" block (drupal marker) nor in Gmap View (large red marker)
In the previous version the markers were consistent through out.
ps. From - /admin/settings/gmap_location
The Node Map is reportedly at "map/nodes" but it resides at "map/node"
#2
I also confirm the same issue...
also I'm having page not found entries in the logs at "sites/all/modules/gmap/markers/undefined"
#3
At a quick glance, the conflict seems to be in the gmaps_views module at around lines 123 & 134 (line numbers approx. as I've hacked my gmaps module for a specific usage):
$themarker = array('markername' => variable_get('gmap_node_marker_'. $type, ''),
Gmaps_location module no longer stores a separate variable for each node type in the variables table; instead it stores an array
$markertypes = variable_get('gmap_node_markers', array());I've fixed my copy by adding
$markertypes = variable_get('gmap_node_markers', array());above approx. line 108 ie:
$markermode = $thismap['#settings']['markermode'];and changing
$themarker = array('markername' => variable_get('gmap_node_marker_'. $type, ''),
to
$themarker = array('markername' => $markertypes[$type],
YMMV; it's a quick fix and the module authors might wish to do this in another manner.
#4
Thanks principessaDS,
That worked with some additions. There are two places to change $themarker['markername']. And I had to clear the cache_views table as well.
This referres to:
gmap_views.module,v 1.1.2.19 2007/10/22 15:42:38 bdragon
My resultant code starting at line 108, looks like this -
// 1 line added - fixes marker inconsistence - #3 http://drupal.org/node/191522
$markertypes = variable_get('gmap_node_markers', array());
$markermode = $thismap['#settings']['markermode'];
foreach ($results as $entry) {
$type = $entry->gmap_node_type;
$location = _gmap_views_get_lat_long_from_ids($entry, $point_ids);
if (($location['lat']) && ($location['lon'])) {
if ($fatmarkers) {
$data = array();
foreach ($view->field as $field) {
if ($fields[$field['id']]['visible'] !== FALSE) {
$data[] = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $entry, $view);
}
}
$themarker = array(
'markername' => $markertypes[$type],
// 1 line replaced - fixes marker inconsistence - #3 http://drupal.org/node/191522
// 'markername' => variable_get('gmap_node_marker_'. $type, ''),
'latitude' => $location['lat'],
'longitude' => $location['lon'],
'view' => array_values($data),
);
}
else {
// Common
$themarker = array(
'markername' => $markertypes[$type],
// 1 line replaced - fixes marker inconsistence - #3 http://drupal.org/node/191522
// 'markername' => variable_get('gmap_node_marker_'. $type, ''),
'latitude' => $location['lat'],
'longitude' => $location['lon']
);
#5
gmap_location.module,v 1.26.2.45 2007/11/08 22:22:11 bdragon Exp $
line 616
'markername' => isset($markertypes[$row->type]) ? $markertypes[$row->type] : 'drupal',should be
'markername' => isset($markertypes[$node->type]) ? $markertypes[$node->type] : 'drupal',#6
Attached is my functioning copy of gmap_views.module
gmap_views.module,v 1.1.2.19 2007/10/22 15:42:38 bdragon
patched with above suggestions #3
#7
It would appear that the inconsistent icon (okay, they all look like Drupal icons regardless of the configuration settings) issue also exists for users, as described above for nodes. If someone has already addressed this, can you post it please? If no response fairly soon, I'll give it a try, but as a newbie could take a little while...
Thanks, CB
#8
@ #3: Nope, you're right on there, exactly how I would have fixed it. Thanks, committed.
@ #5: Good catch, committed.
#9
i have replaced the gmap_views.module and cleared the view cache but still the get the following error in log
Type page not found
Date Sunday, 23 December 2007 - 2:04am
Location http://www.mydomain.com/sites/all/modules/location/gmap/markers/undefined
Referrer http://www.mydomain.com/node/181
Message sites/all/modules/location/gmap/markers/undefined
Severity warning
it get the error everytime the node with location block display and the block is display drupal icon marker. The marker's position is correct.
#10
OK, I just fixed a MAJOR issue with the user map. http://drupal.org/node/204524
Hopefully this will help a bit...
#11
#9 - same error message here.
#12
I'm using Drupal 5.7 and gmap 1.0-alpha1 and have the same problem too. Firefox and Opera are ok, but IE6/IE7 are broken.
But when I changed the jquery to 1.2.3, the error message "sites/all/modules/gmap/markers/undefined" is still there, but IE can show the map now.
#13
+1
I'm also experiencing the same issue.
/sites/all/modules/gmap/markers/undefinedmessages in my log and Drupal icons not being replaced on map.- txcrew
#14
I see the /sites/all/modules/gmap/markers/undefined messages in my log.
The Icons ARE being replaced with the one selected on the /admin/settings/gmap_location configuration page (at the bottom).
Also, I am having trouble when I click on one of the markers ... the map re-centers itself in Russia or somewhere far away from the point. The info bubble does come up, once I move the map back to where I can see it.
Anyone else having that issue?
Thanks ... Paul
#15
Could be an issue with the gmaps api version: http://drupal.org/node/231473#comment-764576
#16
pcoughlin, markers per role replacement works fine in /map/user, but not in user location block (when activated) and that's what is causing those error messages in a watchdog log.
Tormi
#17
I changed to 2008-Mar-12 version and the markers are ok in IE now.
#18
Paul,
My installation of GMAP also "re-centers" itself every time I pick an info bubble. Did you ever receive a resolution on this item? It would be nice to fix in on my systems.
Thanks in advace
#19
hi keithmorr,
I was having the same weird behavior. I found the solution here:
http://drupal.org/node/231473
hope that helps.