Bing Maps v8-SVG内联图钉未触发正确的信息框 [英] Bing Maps v8 - SVG inline pushpin not trigger correct infobox
问题描述
我在Bing Maps v8中遇到问题,其中包含用于图钉的嵌入式SVG字符串图像.我已经使用SVG内嵌图片在信息框中添加了多个图钉.
I am having issue with Bing Maps v8 with inline SVG string image for pushpin. I have added multiple pushpin with infobox using SVG inline image.
一旦地图加载图钉( https://jsfiddle.net/pakpatel/9dc4oxfk/5/show/).我单击图钉#3,#7和#6,它始终会触发图钉#2.在我放大地图并再次尝试后,效果很好.
Once map is loaded with pushpin (https://jsfiddle.net/pakpatel/9dc4oxfk/5/show/). I click pushpin #3 , #7 and #6, it always trigger pushpin #2. After I zoom in to map and try it again it works fine.
这是jsfiddle https://jsfiddle.net/pakpatel/9dc4oxfk/5
Here is jsfiddle https://jsfiddle.net/pakpatel/9dc4oxfk/5
enter code here
推荐答案
问题在于svg图标元素的宽度和高度设置.当前,您设置width="500" height="500"
.将其更改为较小的宽度和高度width="70" height="20"
The issue is with the width and height setting of the svg icon element. Currently you sets width="500" height="500"
. Try after changing it to small width and height width="70" height="20"
这篇关于Bing Maps v8-SVG内联图钉未触发正确的信息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!