Peacho


I'm obviously a little bit behind trying to do finish up a Hurricane Center the second week of July, but I need some help to get it done. My plan is to make a site which uses the Virtual Earth map and GeoRSS pushpins to create a virtual "track" of the storm. It is based off the GeoRSS demo that Keith Kinnan put out a while back. I thought it seemed that it was set up right, but apparently something isn't right, as my storm track for Andrea isn't showing up. I'm not sure why it isn't working right, as it was mostly an extention of his demo. Anyways, I'm somewhat new to the Virtual Earth API (this is my first major project into it), so I would appreciate an extra pair of eyes, and more importantly, some guidance.You can find my Hurricane Center demo at http://thecloudonline.byethost9.com/hurricane/2k7branch.htm. The message at the top of the page explains the limitation of this version (basically because it was pointless to add to it my project if the basics didn't even work). Feel free to browse the source. Another important file you may want to take a look at it is the GeoRSS XML file for Andrea (which is supposed to be the data source for the app). I've tried to fix as much of it as I could but I think something is still wrong there and messing up my whole thing (or at least adding to it). The XML file "shows up" in Firefox correctly, but I get errors in IE. Anyways, if you want to see it, you can get it here. Thanks for any help you may be able to provide, as I'm quite confused at this point.



Re: Need Some Troubleshooting on my Website

Earthware


Hello

You have a function "EventMapLoad()" which sets up the layers for you, but you are never calling this!

Just put "EventMapLoad()" at the end of the "GetMap()" and you should be sorted.

I can heavily recommend using firefox and the excellent firebug plugin for debugging javascript issues like this

Brian Norman

www.earthware.co.uk






Re: Need Some Troubleshooting on my Website

Peacho

Thanks, that probably was part of the problem; however, it still isn't working. I posted an update to my website (use the same links above). As you can see there, when you click the checkbox, the link still doesn't work.

Any more ideas





Re: Need Some Troubleshooting on my Website

Earthware

Again I recommend you use a javascript debugger (like firebug) to step through your code line by line, its all Im doing to find your issues.

This time the problem is:

Code Snippet
map.AddControl(toolbar, 1);

This is erroring causing the rest of the GetMap function to not run, so EventMapLoad is never run. The reason is you are trying to add a control but 'toolbar' is not defined anywhere in your javascript. I expect you are trying to add the div with the id of toolbar If so then change this line to:

Code Snippet
map.AddControl(getElementyById('toolbar'), 1);

And step through the code to ensure that EventMapLoad is now getting called.

Brian Norman

www.earthware.co.uk





Re: Need Some Troubleshooting on my Website

Peacho

So I abandoned this project for a while, thinking things would get better. They aren't.

Now I've installed Firebug and get two errors, the first of which entirely prevents the map from loading.

Here are the errors:

[Exception... "'Permission denied to set property Window.event' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]



Re: Need Some Troubleshooting on my Website

Earthware

Is the test page still the one you quoted before I tried that and nothing seemed to have been fixed/changed from my last fix suggestion

Brian Norman

www.earthware.co.uk





Re: Need Some Troubleshooting on my Website

Derrick

The demo page, http://thecloudonline.byethost9.com/hurricane/2k7branch.htm is actually working on my computer, both on IE and FF. Have you found the problem



Re: Need Some Troubleshooting on my Website

Peacho

Derrick wrote:
The demo page, http://thecloudonline.byethost9.com/hurricane/2k7branch.htm is actually working on my computer, both on IE and FF. Have you found the problem

What do you mean by "working" If I do not have the debugger (Firebug) enabled, the map loads. If it is enabled though, it doesn't load.

Also, does the pushpin work for you, with Andrea That's the part that needs fixing.

The error I am getting with after I press the pushpin seems to be what's stopping it. What's the next step




Re: Need Some Troubleshooting on my Website

Derrick

For me, the map loads with and without the debugger.

The pushpins only shows in IE and not FF. Do check if it's working in IE.

Try and use the full path for the icons instead of "icons/1.png" and see if the icons appear in FF.





Re: Need Some Troubleshooting on my Website

Earthware

Hi

When I use firebug to step through the code line by line firefox errors and stops running your getmap function at this line:

map.AddControl(toolbar, 1);

As before (look up a few posts) I showed how to fix this, I dont understand why IE does not have a problem with this line, but FF does and it stops the rest of the code working as EventMapLoad(); is never called.

Brian Norman

www.earthware.co.uk





Re: Need Some Troubleshooting on my Website

Peacho

Gah! I fixed that locally, but forgot to reupload it to the web server. Now we're on to the next issue (oh joy ). You know how it worked last night in IE Now it doesn't even work there. I'm not exactly sure what got screwed up.

And now I get an "Object Expected" error on IE on guess which line. Yes that AddControl one. I'm not very fluent in JavaScript, so what's up with that




Re: Need Some Troubleshooting on my Website

Derek Chan

Hi,

Try changing this line:


map.AddControl(getElementyById('toolbar'), 1);

to

map.AddControl(document.getElementyById('toolbar'), 1);






Re: Need Some Troubleshooting on my Website

Earthware

oops, yes sorry I forgot the document. thanks Derek

Brian Norman


Need instant Virtual Earth help Try calling me on Skype Prime Call Me





Re: Need Some Troubleshooting on my Website

Peacho

You can tell his is nothing more than a hobby for me. I've decided to yet again, try to finish it, especially with another tropical storm waiting in the wings.

Anyways, I updated the "live" copy (the one online, and not just on my hard drive) to include the "document" part, but it still doesn't appear to be working.

I have two distinctly different problems based on that location thing.

On my local page, with Firebug enabled, I get this error:
Code Snippet
p_elSource.attachEvent is not a function
Init()mapcontrol.ashx (line 842)
InitializeMap()mapcontrol.ashx (line 6416)
LoadMap(27.098254, -57.96386 Latitude=27.098254 Longitude=-57.96386, 4, "h", false, undefined, undefined, undefined)mapcontrol.ashx (line 6190)
GetMap()2k7branch.htm (line 83)
onload(load )2k7branch.htm (line 1)
if(!p_htParams.fixedView){p_elSource.attachEvent("onmousedown",MouseDown);

The VirtualEarth map doesn't even open there, obviously, as it's a breakpoint.

I do not get that error on the page on my webserver, however, I get this one in it's place:

Code Snippet

geoRssLayer1 has no properties geoRssLayer1.Show();

CheckBox1Clicked(input#CB1 on)2k7branch.htm (line 392)
onclick(click clientX=0, clientY=0)2k7branch.htm (line 1)

In neither case does clicking the checkbox do anything. What's the next step





Re: Need Some Troubleshooting on my Website

Peacho

Anyone