icon.js
Drupal.gmap.expandIconDef = function(c,path,files) {
...
if (!c[0][i]) { // '0' is not an object, and the following lines also throw similar error
c[0][i] = [ fallback[i] ];
}
c[0][i] = Drupal.gmap.expandArray(c[0][i],c[0][0].length);
...
}
Comments
Comment #1
darkodev commentedComment #2
PGiro commentedI have the same thing on Firefox 2 via Firebug and my markers do not get displayed. Using D6-1.0
Comment #3
bdragon commentedCould I get a list of enabled modules?
Comment #4
PGiro commentedHere is mine
cck
extra_voting_forms
feedburner
google_cse
pathauto
service_links
token
viewscarousel
activity_log
devel
facebook_status
feed_tools (#custom, no UI)
gravatar
pcp
tagadelic
twitter
views_slideshow
adsense
directory
fbconnect
flag
jcarousel
pgprod
taxonomy_image
user_activity
votingapi
advanced_help
drigg
feedapi
forward
link
popups
taxonomy_list
user_karma
websnapr
ajax_comments
drigg_external
feedapi_itemfilter
friendlist
mollom
privatemsg
taxonomy_manager
user_visits
xmlsitemap
avatar_selection
drigg_rss_feedapi (#custom, no UI)
feedapi_mapper
google_analytics
nodewords
rules
views
Comment #5
PGiro commentedI have done a little debugging and here is what I found
My setup : I have defined a location in a node and the node body is [gmap], that's all. The map gets displayed but no marker. I know it's not a filter issue because I only have a gmap filter applied
Drupal.gmap.iconSetupgets called and it iterates over the markers.results in two calls to
expandIconDef, the second creates the error.The first gets called correctly with the contents of
/small.i["0"]while the second call is with /small.i["add"] => it looks as if it confuses the methods on the .i[] array and its contentsComment #6
PGiro commentedOk, I confirm this is the issue.
I removed all markers except the big directory and replaced
with
(and yes, those are comments)
and I now get my marker (which is red)
I am not a javascript guru, can someone explain why
for (var ini in m[path].i)iterates over the array's prototype functions ??Comment #7
darkodev commentedThis issue affects us in a different context: the dynamic render module fails to hide the appropriate css class, so the text appears twice, but only on pages that show the gmap.
Comment #8
bdragon commentedBecause someone dicked around with Object.prototype?
Comment #9
bdragon commentedAnyway, it's been a while since I've visited that bit of code, and the Drupal coding standards have changed. Expecting people not to touch Object.prototype is a lost battle in today's world it seems, so I ended up putting if() guards in.
http://drupal.org/cvs?commit=168928
http://drupal.org/cvs?commit=168930
Comment #10
bdragon commentedI'm pretty sure this will fix the errors, could someone check?
Rev. 1.4 can be dropped into both D5 and D6, and I'm pretty sure it's fully compatible with 1.0.
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/gmap/js/ico...
Comment #11
PGiro commentedHi bdragon, I no longer get a javascript error.
Unfortunalty, I cannot confirm that it works as the marker does not appear using your code or my previous code at #6, sigh...
Comment #12
PGiro commentedI can confirm the fix works for me using gmap_simple_map() in Chrome, FF3 and IE. Thanks !
Comment #13
rooby commentedReported as fixed.