0
我的網站未顯示Google地圖中的道路(我正在使用Google地圖API)。 地圖已被設計爲與網站主題相匹配。一段時間以來,道路可見。但它現在已經消失Google Maps API未顯示道路
以下是使用的樣式代碼;
var myCenter=new google.maps.LatLng(40.760845,-73.98611);
var marker;
function initialize()
{
var mapProp = {
center:myCenter,
zoom:16,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
var marker=new google.maps.Marker({
position:myCenter,
animation:google.maps.Animation.DROP,
icon: 'http://www.dummywebsite.com/dummyimages/icon.png'
});
var styles = [
{
featureType: "administrative.locatlity",
elementType: "geometry.fill",
stylers: [
{ "color": "#444444" },
{ weight: "1.8" }
]
},{
featureType: "road",
elementType: "geometry.fill",
elementType: "geometry.stroke",
stylers: [
{ visibility: "on" },
{"color":"#000000"},
{ "lightness": 45}
]
},
{
"featureType": "all",
"elementType": "labels.text.stroke",
"stylers": [
{
"visibility": "off"
},
{
"color": "#000000"
},
{
"lightness": 12
}
]
},
{
"featureType": "business",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#555555"
},
{
"lightness": 20
}
]
},
{
"featureType": "all",
"elementType": "labels.text.fill",
"stylers": [
{
"visibility": "on"
},
{
"color": "#888888"
},
{
"lightness": 25
}
]
},
];
map.setOptions({styles: styles});
marker.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
尋求寶貴的支持來解決這個問題。
下面是它現在的樣子。道路缺少
謝謝你的回覆。但是,這些問題僅限於嵌入式地圖。 – Gops