Kyle Meyer says,

Google Maps API: “a has no properties”

This error is largely undocumented and gave me a few good hours of headache trying to debug. I’ve used the Google Maps API plenty in previous projects, but in my latest project, I rewrote all of the basic map loading script and arrived at the page spewing “a has no properties” with every map interaction.

The fix is to call map.setCenter(GLatLng(#,#)) directly after instantiating the GMap2 object. For whatever reason, this fixes all ills, and relieves my headache.

This post was written by Kyle Meyer on May 16, 2008. Kyle is a front-end web developer in Portland, Oregon. He loves riding his bike, being an avid amateur photographer, and working on side projects when he's not working at Kittelson.

« You’re a masseuse? Please, scratch my back. | Pole Pedal Paddle: Team Photo »

Comment on this

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>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word