Google地图v3:标记的大尺寸 [英] Google Maps v3: large size for markers
问题描述
我需要在我的地图上显示标记,并且运行良好。唯一的问题是它们看起来太小。我如何确保使用的标记尺寸很大,几乎可以在任何缩放状态下显示? 解决方案
如果您的使用api的第3版 -
创建标记时,可以在标记选项中指定像这样的图标:
icon:new google.maps.MarkerImage(
url:string,size?:Size,
origin?:Point,anchor?:Point, scaledSize?:大小
)
将大小设置为图标图像的实际大小。
将scaledSize设置为您想要将图像拉伸到的任意大小。
最好将图标图像制作为您想要的大小,而不是缩放它。
I need to display markers on my map and it's working well. The only problem is that they appear to be too small. How can I make sure that the markers used are large in size and can be visible from almost any zoom state?
If your using version 3 of the api-
When you create the marker, in the marker options you can specify the icon like this:
icon: new google.maps.MarkerImage(
url:string, size?:Size,
origin?:Point, anchor?:Point, scaledSize?:Size
)
Set size to the actual size of your icon image. Set scaledSize to whatever size you want to stretch the image to.
It is better of cause to make an icon image the size you want instead of scaling it.
这篇关于Google地图v3:标记的大尺寸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!