I have the following code. On our dev environment (Server 2008 running IIS7) it creates the map and displays it fine. But on our staging enviroument (Server 2003 running IIS6) it gets a map object that cannot be used. Both servers are being hit by an IE11 client. I have also tried Chrome and Safari browsers and got the same results).
var mapOptions = {
scaleControl: false,
draggable: true,
//overviewMapControl: true,
//overviewMapControlOptions:{opened:true},
mapTypeId: google.maps.MapTypeId.HYBRID,
mapTypeControl: false,
panControl: false,
rotateControl: true,
zoomControl: true,
scaleControl: true,
streetViewControl: false
};
//divMap is the Id for the div I want the map to be container i
var mapElement = document.getElementById(divMap);
var m_objMap = new google.maps.Map(mapElement, mapOptions);
var m_cpo = new CanvasProjectionOverlay();
m_cpo.setMap(m_objMap);
CanvasProjectionOverlay code (taken from another StackOverflow post) CanvasProjectionOverlay (scroll down to answer)
function CanvasProjectionOverlay() { }
CanvasProjectionOverlay.prototype = new google.maps.OverlayView();
CanvasProjectionOverlay.prototype.constructor = CanvasProjectionOverlay;
CanvasProjectionOverlay.prototype.onAdd = function () { };
CanvasProjectionOverlay.prototype.draw = function () { };
CanvasProjectionOverlay.prototype.onRemove = function () { };
Anything I try to do with m_objMap from this point on seems to fail.
one example of the error message is:
"setMap: not an instance of Map, and not an instance of StreetViewPanorama".
Does anyone have any thoughts on a direction for debugging? I have been looking at this for a while. The google API service is the same, the only different between the HTML from both servers are the URL server names.