×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Maps don't appear

Maps don't appear 12 years 7 months ago #15660

  • Geoffrey Mack
  • Geoffrey Mack's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Hi there.

I've been fiddling with your component for about an hour now and can't get a map to appear. It is simply blank in the front end. It shows up fine in the back end. I've tried to have the menu point to a single hotspot and to a category, but neither work. The hotspot submission layout works fine.

Unfortunately, I can't show you the site because it is not registered in DNS yet.

But I can show you the errors in the javascript console. There are two:

Uncaught TypeError: Cannot set property 'localstorage' of undefined
Object.extend.appendmootools-core.js:44
(anonymous function)

and,

Uncaught TypeError: undefined is not a function
c.Request.Class.initializemootools-core.js:460
Class.refactor.initializemootools-more.js:250
(anonymous function)mootools-more.js:25
(anonymous function)mootools-more.js:27
i.extend.$ownermootools-core.js:140
(anonymous function)mootools-core.js:135
Map.InfoWindow.Class.getRequestMap.InfoWindow.js:77
i.extend.$ownermootools-core.js:140
(anonymous function)
(anonymous function)Class.SubObjectMapping.js:24
Object.eachmootools-core.js:38
SubObjectMapping.Class.mapToSubObjectClass.SubObjectMapping.js:23
i.extend.$ownermootools-core.js:140
Map.InfoWindow.Class.initializeMap.InfoWindow.js:56
(anonymous function)mootools-more.js:27
i.extend.$ownermootools-core.js:140
(anonymous function)mootools-core.js:135
Class.initInfoWindowHotspots.js:25
i.extend.$ownermootools-core.js:140
Hotspots.Hotspot.Class.initializeHotspots.Hotspot.js:8
(anonymous function)mootools-more.js:27
i.extend.$ownermootools-core.js:140
(anonymous function)mootools-core.js:135
(anonymous function)local-attractions:54
(anonymous function)mootools-core.js:370
hmootools-core.js:33
Array.implement.eachmootools-core.js:39
invoke.fireEventmootools-core.js:369
g

Ideas?

Re: Maps don't appear 12 years 7 months ago #15661

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Which moootools version are you using? Do you have jquery on the page? maybe conflict with it?

daniel

Re: Maps don't appear 12 years 7 months ago #15662

  • Geoffrey Mack
  • Geoffrey Mack's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Hi Daniel.

I don't see any jquery when I search the source.

Regarding mootools, I am using the version that comes with Joomla 2.5.3. Looks like: version:"1.4.5",build:"ab8ea8824dc3b24b6666867a2c4ed58ebb762cf0"

Re: Maps don't appear 12 years 7 months ago #15663

  • Geoffrey Mack
  • Geoffrey Mack's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Oh, shoot. There is definitely some javascript on the page that conflicts with your component. I'll start putting the scripts back one by one to see which is the culprit.

Re: Maps don't appear 12 years 7 months ago #15664

  • Geoffrey Mack
  • Geoffrey Mack's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
OK, I found the .js file that is conflicting with yours. But I don't know how to resolve the problem. I assume that your component is using either a variable or function name that is also being used by this one?

I'm over my head. I need this other file. It is a key element on our site.

If I attach the conflicting .js file, do you think you might be able to spot the conflict?
Attachments:

Re: Maps don't appear 12 years 7 months ago #15667

  • Geoffrey Mack
  • Geoffrey Mack's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
OK, I am a little closer, but still need your help. Here is the specific section of code in my .js file that is causing your component to fail:

Code display:
var Browser = new Object();
with (Browser) {
	Browser.b = Browser;
	b.a = navigator.userAgent.toLowerCase(); 
	b.v = navigator.appVersion;
	b.version = parseFloat(v);
	b.major = parseInt(v);
	b.opera = (a.indexOf('opera') != -1)?true:false;
	b.hotjava = (a.indexOf('hotjava') != -1)?true:false;
	b.webtv = (a.indexOf('webtv') != -1)?true:false;
	b.nav = (a.indexOf('mozilla') != -1 && a.indexOf('spoofer') == -1 && 
		a.indexOf('compatible') == -1 && !opera && !webtv && !hotjava)?true:false;
	b.nav4 = (nav && major == 4)?true:false;
	b.nav6 = (nav && major == 5)?true:false;
	b.nav6up = (nav && major >= 5)?true:false;
	b.aol = (a.indexOf('aol') != -1)?true:false;
	//b.ie = (!opera && a.indexOf('msie') != -1)?true:false;
	b.ie = (opera || a.indexOf('msie') != -1)?true:false;
	b.ie4 = (ie && major == 4 && a.indexOf('msie 4') != -1)?true:false;
	b.ie4up = (ie && major >= 4)?true:false;
	b.ie5 = (ie4up && a.indexOf('msie 5.0') != -1)?true:false;
	b.ie5up = (ie4up && !ie4)?true:false;
	b.macie5=(ie4 && v.indexOf("macintosh")!=-1)?true:false;
	b.ie55 = (ie5up && a.indexOf('msie 5.5') != -1)?true:false;
	b.ie55up = (ie5up && !ie5)?true:false;
	b.ie6 = (ie4up && a.indexOf('msie 6.') != -1)?true:false;
	b.ie6up = (ie55up && !ie55)?true:false;
	b.win95 = (a.indexOf('win95') != -1 || a.indexOf('windows 95') != -1)?true:false;
	b.win98 = (a.indexOf('win98') != -1 || a.indexOf('windows 98') != -1)?true:false;
	b.mac = (a.indexOf('macintosh') != -1)?true:false;
	b.win9x = (win95 || win98)?true:false;
	b.sun = (a.indexOf('sunos') != -1)?true:false;
}

I have no idea how to fix this, but I know if I keep it your component fails, and if I remove it critical functionality on my site fails. Please help!

Re: Maps don't appear 12 years 7 months ago #15669

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
I guess that this is conflicting with mootools??? I'm not browser sniffing anywhere in my code. Mootools does this normally...

Are you sure that you see that error only on the page with hotspots and not on all pages where mootools is loaded.
Daniel

Re: Maps don't appear 12 years 7 months ago #15670

  • Geoffrey Mack
  • Geoffrey Mack's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
OK, I solved it. For some reason the first line of that code was the problem. It was clearing out some mootools settings for Browser. Commenting it out solved it.

It isn't a problem with your software at all. Just with my code and mootools.

Thanks for your help.

Re: Maps don't appear 12 years 7 months ago #15671

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Happy that it is working now! Enjoy ;)
Daniel
  • Page:
  • 1
Time to create page: 0.127 seconds