Google maps Marker Label with multiple characters

前端 未结 7 1284
别那么骄傲
别那么骄傲 2020-11-27 14:48

I am trying to add a 4 character label (eg \'A123\') to a Google Maps marker which has a wide icon defined with a custom path.



        
7条回答
  •  隐瞒了意图╮
    2020-11-27 15:10

    As of API version 3.26.10, you can set the marker label with more than one characters. The restriction is lifted.

    Try it, it works!

    Moreover, using a MarkerLabel object instead of just a string, you can set a number of properties for the appearance, and if using a custom Icon you can set the labelOrigin property to reposition the label.

    Source: https://code.google.com/p/gmaps-api-issues/issues/detail?id=8578#c30 (also, you can report any issues regarding this at the above linked thread)

提交回复
热议问题