gpt4 book ai didi

javascript - map 中的人工制品

转载 作者:行者123 更新时间:2023-11-30 17:58:47 26 4
gpt4 key购买 nike

<分区>

我正致力于使用 gMaps.js 嵌入 Google map 。

基本上所有功能都可以使用,但在某些地方 map 会出现瑕疵。

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 中。有什么解决办法吗?

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com