On Mar 24, 11:37 am, Yiman <[email protected]> wrote:
> My websitehttp://geodata.acad.emich.edu/Crime/Main.htmhas
> encountered a strange problem since this afternoon. Whenever I change
> the location of my google map, there is a error pop up saying in line
> 200, Char 173, "'offsetWidth' is null or not an object".
>
> I checked my code, there is nothing in line 200, and there is nothing
> called 'offsetWidth' in my code. Please help me why is this happening
> now, and never did before.
>

It is caused by your "go()" function which is destroying and
recreating the map every time you call it.  The direct cause is the
call to map.addControl(new GOverviewMapControl(...))

If you only create the map once, rather than destroying it and
recreating it and its controls every time you run the go() function,
the error goes away.

You can just comment those lines out of the 2 places you do it in your
go() function, as you have already created the map in initialize() and
you don't need to do it again.

  -- Larry
--~--~---------~--~----~------------~-------~--~----~
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