1
我正在使用gMaps.js嵌入Google地圖。Gmaps中的工件
基本上所有的功能都在工作,但是在一些地方,地圖會給出美感。
Screenshot (Check Zoom control and Infowindow)
下面的代碼被執行:
var map = new GMaps({
div: '#map_canvas',
lat: 51.594664,
lng: 4.778375,
zoom: 16,
zoomControl: true,
scaleControl: false,
scrollwheel: false,
disableDoubleClickZoom: true,
});
var image = new google.maps.MarkerImage(
'[image-link]',
new google.maps.Size(100,109), // size of the image
new google.maps.Point(0,0), // origin, in this case top-left corner
new google.maps.Point(5, 25) // anchor, i.e. the point half-way along the bottom of the image
);
map.addMarker({
lat: 51.59554,
lng: 4.789006,
title: 'TEST',
icon: image,
infoWindow: {
content: '<h2>TEST</h2><p>HTML Content</p>'
}
});
var styles = [
{
"featureType": "landscape.man_made",
"stylers": [
{ "visibility": "on" }
]
},{
"featureType": "water",
"stylers": [
{ "visibility": "simplified" },
{ "color": "#21bbe2" }
]
},{
"featureType": "poi",
"stylers": [
{ "visibility": "off" }
]
},{
"featureType": "road",
"stylers": [
{ "visibility": "on" },
{ "hue": "#ff0011" },
{ "color": "#9e8baa" }
]
}
]
map.addStyle({
styledMapName:"Styled Map",
styles: styles,
mapTypeId: "map_style"
});
map.setStyle("map_style")
我無法找到有關這個問題的任何。我試圖單獨刪除代碼的所有部分,但那不起作用。它發生在Chrome和Firefox中。任何解決方案