Bing maps ajax control 7.0 polygon fillColor in IE8
In internet explorer 8, none of my polygons on my bing maps have the proper fill color. They are always filled in white. I have no issues in firefox, chrome, safari or opera.
I've even tried using the exact code from the bing docs
// Initialize the map
var map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), {credentials:"Bing Maps Key"});
// Create the locations
var location1 = new Microsoft.Maps.Location(20,-20);
var location2 = new Microsoft.Maps.Location(20,20);
var location3 = new Microsoft.Maps.Location(-20,20);
var location4 = new Microsoft.Maps.Location(-20,-20);
// Create a polygon
var vertices = new Array(location1, location2, location3, location4, location1);
var polygoncolor = new Microsoft.Maps.Color(100,100,0,100);
var polygon = new Microsoft.Maps.Polygon(vertices,{fillColor: polygoncolor, strokeColor: polygoncolor});
// Add the shape to the map
map.entities.push(polygon)
// Set the view
map.setView({bounds: Microsoft.Maps.LocationRect.fromLocations(vertices)});
Has anyone experienced this?
开发者_如何学编程I am also using jquery 1.5.1
Figured out the issue.
I was using a htc file (ie-css3.htc) for some css3 effects in IE. I guess this doesn't play nicely with bing maps polygon colors.
精彩评论