Last modified: 2010-05-07 15:28:13 UTC
Hi Jeroen, to find out the problem why (Semantic) Maps does not get along with SMWHalo (and any other extension using the Prototype.js framework) i figured out that you're using 'for ... in' loops in your javascript code to (mostly) add your markers to the map. I replaced these loops with the "standard" version "for( ; ;)" according to [1] and got Maps and SemanticMaps working with prototype.js active. I would appreciate if you could check this and possibly change these loops to work reliable on any environment. [1] http://proto-scripty.wikidot.com/prototype:tip-looping-through-arrays Kind regards, Benjamin
Awesome! I had no idea it was that simple to fix. Do you have any patch? If not I'll make the changes myself soonish.
Yes, i have been surprised, too. Thought it would be a "bigger deal". I'll attach two patches for you - one for Maps and one for Semantic Maps. Please apply them in the appropriate extension folder. Please notice that 1. I might not have covered all occurrences of 'for ... in'. So no guarantee :) 2. I could not test it with yahoo because of a missing key. 3. I did not touch the "minified js files". *min.js 4. If you think you might handle long arrays you should think about caching the array length. I hope that this fixes all the "prototype clashings". Greetings, Benjamin
Created attachment 7353 [details] Changes "for ... in" in Maps Extension javascript. Apply to '<mw-dir/>extensions/Maps'.
Created attachment 7354 [details] Same for Semantic Maps. Apply to '<mw-dir>/extensions/SemanticMaps'.
Applied patches in r66022 and r66023. Thanks again for the help here :)
You're welcome :) And thanks a lot for your quick reply.