google maps and safari

Posted by sergio_101 on Apr 19th, 2007
2007
Apr 19

okay, here’s something to think about..

we just released a new website at:

http://www.theresthisplace.com

it is heavily reliant on google maps.. actually, the whole point of the site is google maps.

i learned a WHOLE bunch of interesting things doing this.. just when i think that the i have found out where all the pitfalls of javascript are, i find a new one..

this one is TOTALLY my fault.. but i would imagine tons of folks will make this error, so i am hoping to save someone a few hours.

when programming application that have heavy reliance on geographic location, it’s VERY tempting to use variables like:

add_marker(lat, long);

BUT!

in case you have forgotten, ‘long’ is a reserved keyword in javascript..

here’s the problem..

firefox, ie, and everything else will not have a problem with this..

safari will choke on this.. and.. safari doesn’t really clue you in on errors.. there is no firebug..

if you find your maps are not showing up in safari, do a quick code search for this error..

let me know if this worked for you..

Leave a Comment




XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.