Thanks for your reply..

I'll have to digest it a bit..  Sounds simple enough though.

I wonder if there's a way to turn off the listener for the overlay,
but leave it active for the map?

You probably would assume this, but the REST service has nothing to do
with the issue. I removed it and still receive the same error. Like
you mention the click event on the poly is getting in the way.

Thanks again and for others, I'll post the solution.

On Nov 5, 12:37 pm, "warden [Andrew Leach - Maps API Guru]"
<[EMAIL PROTECTED]> wrote:
> On Nov 5, 5:23 pm, K-Dawg <[EMAIL PROTECTED]> wrote:
>
>
>
> > From time to time I get a Lat is null or not an object error message.
> > I can't for the life of me figure this out.. If you zoom in and try to
> > trace an area, you'll see the message. It's rather frustrating and is
> > preventing me from going live with the application.
>
> When you click on the map, you call
> function mapClick(marker, clickedPoint)
>
> BUT when you click on the polygon, you get a click on the polygon AND
> the map. You don't do anything with the click on the polygon. But the
> click on the map passes the polygon as the overlay (which you call
> marker in your function), null (because the click wasn't on the map)
> and a GLatLng of the actual click (which you ignore). So when you try
> and do something with the click, the code finds it hasn't been passed
> its location, and fails.
>
> You could probably make it work by changing that line to
> function mapClick(marker, clickedPoint, mapClickedPoint) {
>   if (mapClickedPoint) { clickedPoint = mapClickedPoint }
>
> so that if you've clicked on the polygon and mapClickedPoint contains
> that location, you simply transfer it to clickedPoint and carry on as
> before. I haven't tested that though.
>
> Note that it can make debugging very difficult if you trap errors
> yourself in a try/catch block.
>
> Andrew
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to