Thank you so much Larry and Andrew.
Setting the variables works. I would probably never have figured that
one out by my self.
Thanks again...
/Rune

On 22 Dec., 14:40, Andrew Leach <[email protected]> wrote:
> On 22 December 2010 13:06, Hep <[email protected]> wrote:
>
> > I get these error messages when I run the IE8 debugger:
>
> >  Object doesn't support this property or method:
> >        map = new google.maps.Map(document.getElementById("map"),
> >      mapOptions);
>
> That's probably the root of the problem. If you have an element with
> id "map", then IE will "helpfully" create a Javascript variable called
> map which references it. You can't set that element to be a new Map
> object. Because your variable "map" isn't set, none of its properties
> are set either, so map.mapTypes and the rest don't exist.
>
> Try
>
> var map = new google... (etc)
>
> which creates a defined Javascript variable, breaking IE's link to the
> element. It's always good practice to use the var keyword when
> defining a variable because it helps to define its scope.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to