Resize Google Maps marker icon image

后端 未结 7 1588
感动是毒
感动是毒 2020-11-29 17:41

When I load an image into the icon property of a marker it displays with its original size, which is a lot bigger than it should be.

I want to resize to the standard

7条回答
  •  萌比男神i
    2020-11-29 18:22

    So I just had this same issue, but a little different. I already had the icon as an object as Philippe Boissonneault suggests, but I was using an SVG image.

    What solved it for me was:
    Switch from an SVG image to a PNG and following Catherine Nyo on having an image that is double the size of what you will use.

提交回复
热议问题