Ok, found the options that your talking about. Thanks. I haven't done
programming since last August when I was laid off. As a result I've
got a little rusty with my skills and practices and just threw
something together. But yes I should of had a check in there, and I
would of caught the error much earlier. Its interesting that Firefox
was able to handle the points and IE did not. Of course the other
part of catching errors is peer review. I cant count all the times
that I've showed someone a piece of broken code and they've seen the
error right away or I see it when I explain what I'm doing in the code
to them. Which is part of the reason I posted the code to the group.
Thanks.
Matthew Sturdevant
On May 8, 9:22 am, Bruce Van Allen <[email protected]> wrote:
> I just just keep IE's preference enabled for showing script errors.
>
> In IE7, it's under Tools -> Internet Options -> Advanced -> Browsing -
>
> > Display a Notification About Every Script Error.
>
> You might search around for more verbose utilities, but the above does
> give useful clues.
>
> As a related matter, I think good practice would call for checking
> your points before attempting to create markers with them.
>
> E.g., as you loop through the location data, check whether you get a
> valid LatLng, and skip creating a marker for that point if not.
>
> var debug = true; // global variable usually set to false; set to
> true for testing.
>
> // later, inside your loop through location data:
>
> var newPoint = new GLatLng(lat,lon);
> if (newPoint = null) {
> if (debug) GLog.write('Point error with lat ' + lat + ', lon '
> + lon + '. Location skipped.');
> continue;
> }
>
> Even if you quietly skip a bad point (that is, without reporting via
> GLog), your script will be able to carry on.
>
> Invalid coordinates show up in lots of ways, not just hand-coded XML,
> so it pays to take precautions and report out failures. Storing map
> coordinates that haven't been checked risks problems later. In my
> previous life as a woodworker, we had a name for what you get when a
> mistake made early on isn't noticed: "time bomb". You can count on
> them exploding right when you deliver the cabinet for installation,
> most likely with the client standing right there!
>
> On May 8, 8:00 am, Matthew <[email protected]> wrote:
>
> > Larry,
> > Thanks for catching that. I had to manually generate the xml file
> > from a excel sheet of addresses. I then added in the lat lon for each
> > one. That's the problem with doing it all by hand you can miss one
> > small thing and mess everything up. Ok last question how did you
> > figure out that the function Pi was generating the error? I have not
> > found a good way to view the exact source that IE is using to build
> > the page. In Firefox I just use Firebug. Is there something similar
> > for Internet Explorer? Anyway thanks again.
>
> > Matthew Sturdevant
>
> > On May 7, 10:07 pm, "[email protected]" <[email protected]>
> > wrote:
>
> > > On May 7, 8:06 pm, Matthew <[email protected]> wrote:
>
> > > > Yup your right I don't call it. Must of been left over from something
> > > > I borrowed. Anyway removed the showAddress function and got the same
> > > > error. But the error doesn't seem to mean anything. Thanks for
> > > > catching that. I should of caught it.
>
> > > The error is here:
> > > function Pi(a,b){a.style.left=I(b)}
> > > a is a div
> > > b is NaN
>
> > > That comes from the API processing this call:
> > > map.addOverlay(marker);
>
> > > where:
> > > var marker = createMarker(markers[i], i);
>
> > > i = 84
>
> > > This entry in your xml is invalid:
> > > <marker lat="38.648945" lng=",-121.382452," label="California Check
> > > Cashing" address="4630 Watt Ave" city="N Highlands" state="CA"
> > > zipcode="95660" weekdayHours="8:00AM-9:00PM" satHours="9:00AM-6:00PM"
> > > sunHours="10:00AM-6:00PM" />
>
> > > lng=",-121.382452," is not a number (NaN)...
>
> > > -- Larry
>
> > > > On May 7, 5:17 pm, Ralph Ames <[email protected]> wrote:
>
> > > > > Interesting if you delete that function
> > > > > you get another error message.
>
> > > > > But the map works in the same way.
>
> > > > > Where is this function called?
>
> > > > > Ralph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---