NilObjectException occurs when plotting coordinate on Google map

Huh, I assumed from Waynes response that WebMapLocation didn’t support a key but checking the docs now http://documentation.xojo.com/index.php/WebMapLocation, I see it does have an APIKey property.

How to set it before constructing a WebMapLocation I can’t figure out !? Maybe create one, then set APIKey and use MoveTo for all subsequent locations.

doh. Looks like you can create a WebMapLocation without parameters even though that’s not listed in the Constructors.

I didn’t say it doesn’t support a key, just that there are issues with it’s implementation.

:slight_smile: I didn’t mean to imply you did, just that i a??-u-me-d. But what are the issues with it’s implementation?

You’ll get a NOE from the request with a message of request_denied. I’ve filed a report, but it’s private due to including my api key. Greg has confirmed the issue.

Well, than I have to think about a workaround :-s

Anyway, thank to you all for your help and feedback. If anyone can think of a working work-a-round, I am interrested. Meanwhile I will search myself too for a work-a-round.

This is the class I built to get the latitude & longitude for an address. You use it by creating an instance, applying your google api key then setting the address property. It will respond by firing the location event with the geometry data from Google Maps.

Wayne, thanks for your solution. But… I found the solution for me in Google earth and .kml files.

My Xojo project generates a .kml file and Google earth is updated correctly.

Thank you all for your help and suggestions