If you visit my website, you'll notice that the StreetView control, "Pegman", functions perfectly on Firefox. However, when I tested it on IE (specifically 7 and 8), it caused issues with displaying the Pegman control.
Below is the code I am using for my map:
var directionsDisplay;
var directionsService = new google.maps.DirectionsService();
var map;
directionsDisplay = new google.maps.DirectionsRenderer();
var milBase = new google.maps.LatLng(35.79648921414565, 139.40663874149323);
var mapOpts = {
streetViewControl: true,
zoom: 12,
center: milBase,
mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU },
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map($("#dirMap").get(0), mapOpts);
directionsDisplay.setMap(map);
// More code for polygon and marker...
function calcRoute() {
// Code for calculating route...
}
The main difference between my code and Google's code is that I use jQuery's document ready function instead of the body onload event to initialize the map. This shouldn't be the cause of the issue though (it worked fine with v2 of the maps).
Could this be a bug or is there an error in my code?
Any help would be appreciated!