On May 6, 10:25 pm, dabernathy89 <[email protected]> wrote:
> Can't get my map to load in ie9. Should show at least 1 marker.
>
> http://dabernathy89.powweb.com/googlemaps/foramerica/


In IE I get an error:
Line: 16
Error: Object doesn't support this property or method

Your problem is this line:
map = new google.maps.Map(document.getElementById("map"), {
        center: new google.maps.LatLng(37.09024,-96.591797),
        zoom: 4,
        mapTypeId: 'roadmap',
        streetViewControl: false,
        zoomControl: true,
        zoomControlOptions: {
          style: google.maps.ZoomControlStyle.LARGE
        }
      });

You haven't created a javascript variable "map".  IE helpfully creates
one for your "map" div, but that can't be used for a google map.

You need to create it with the "var" keyword:
var map = new google.maps.Map(document.getElementById("map"), ...
(that will make it loacal to your load function)

  -- Larry

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