gpt4 book ai didi

javascript - 谷歌地图API,如何为多个自定义标记添加标记阴影

转载 作者:行者123 更新时间:2023-11-28 20:22:17 25 4
gpt4 key购买 nike

请在此处观看现场演示: http://www.bmbsuaritma.com.tr/bmb-su-aritma-kampanyali-urunler.html

您可以在这里找到我的标记阴影: http://www.bmbsuaritma.com.tr/images/retail_logos/shadow-baumax.png

我无法将阴影添加到我的标记中。我的代码如下,我们将不胜感激

function initialize() {
var locations = [
['Tekzen Yapı Market - SİİRT ANDERA PARK AVM',37.933849,41.945507,2,'http://www.bmbsuaritma.com.tr/images/retail_logos/tekzen.png','<font face="arial" size="2"><div dir="ltr"><a href="http://www.bmbsuaritma.com.tr" target="_blank"><img src="http://www.bmbsuaritma.com.tr/images/retail_logos/tekzen-marker.png" alt="BMB Su Arıtma Cihazları"></a><br><strong><font color="blue">Mağaza:</font></strong> Siirt Andera Park AVM<br><strong><font color="blue">Adres:</font></strong> Andera Park AVM Yeni Mah.Cengiz Topal Cad.No:69, SİİRT<br><strong><font color="blue">Tel:</font></strong> (0484) 290 11 35 <br><br><a href="http://www.tekzen.com/Magazalarimiz" target="_blank"><strong><font color="red">&gt;&gt; Mağaza Sayfası</font></strong></a></div></font>'],
['Tekzen Yapı Market - DİYARBAKIR NCity AVM',37.929962,40.205238,1,'http://www.bmbsuaritma.com.tr/images/retail_logos/tekzen.png','<font face="arial" size="2"><div dir="ltr"><a href="http://www.bmbsuaritma.com.tr" target="_blank"><img src="http://www.bmbsuaritma.com.tr/images/retail_logos/tekzen-marker.png" alt="BMB Su Arıtma Cihazları"></a><br><strong><font color="blue">Mağaza:</font></strong> Diyarbakır NCity AVM<br><strong><font color="blue">Adres:</font></strong> N city avm .Turgut Özal Bulvarı MTA Bölge Müdürlüğü yanı Aydın Kent Şelale evleri No 1/84 Bağlar, DİYARBAKIR<br><strong><font color="blue">Tel:</font></strong> (0412) 237 76 20 <br><br><a href="http://www.tekzen.com/Magazalarimiz" target="_blank"><strong><font color="red">&gt;&gt; Mağaza Sayfası</font></strong></a></div></font>']

];

var map = new google.maps.Map(document.getElementById('map'), {
panControl: false,
zoomControl: true,
zoomControlOptions: {
style: google.maps.ZoomControlStyle.LARGE,
position: google.maps.ControlPosition.LEFT_CENTER
},
scaleControl: true,
scaleControlOptions: {
position: google.maps.ControlPosition.BOTTOM_LEFT
},
streetViewControl: false,
zoom: 6,
center: new google.maps.LatLng(39, 33.3),
mapTypeId: google.maps.MapTypeId.ROADMAP
});

var infowindow = new google.maps.InfoWindow({
maxWidth: 220
});

var marker, i;

for (i = 0; i < locations.length; i++) {
marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map,
zIndex: locations[i][3],
icon: locations[i][4],
});

google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
infowindow.setContent(locations[i][5]);
infowindow.open(map, marker);
}
})(marker, i));
}
}

google.maps.event.addDomListener(窗口, '加载', 初始化);

最佳答案

Google Maps JavaScript API 3.14 版本不再支持标记阴影。

以下内容来自https://developers.google.com/maps/documentation/javascript/markers :

Note: Marker shadows were removed in version 3.14 of the Google Maps JavaScript API. Any shadows specified programmatically will be ignored.

关于javascript - 谷歌地图API,如何为多个自定义标记添加标记阴影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18048082/

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