Google maps: place number in marker?

前端 未结 11 2173
感情败类
感情败类 2020-12-12 17:09

How can I display a number in the marker on a google map? I want to do server side clustering and I need to display how many points the cluster represents.

11条回答
  •  一向
    一向 (楼主)
    2020-12-12 17:53

    Here are custom icons with the updated "visual refresh" style that you can generate quickly via a simple .vbs script. I also included a large pre-generated set that you can use immediately with multiple color options: https://github.com/Concept211/Google-Maps-Markers

    Use the following format when linking to the GitHub-hosted image files:

    https://raw.githubusercontent.com/Concept211/Google-Maps-Markers/master/images/marker_[color][character].png
    

    color

    red, black, blue, green, grey, orange, purple, white, yellow
    

    character

    A-Z, 1-100, !, @, $, +, -, =, (%23 = #), (%25 = %), (%26 = &), (blank = •)
    

    Examples:

    https://raw.githubusercontent.com/Concept211/Google-Maps-Markers/master/images/marker_red1.png

    https://raw.githubusercontent.com/Concept211/Google-Maps-Markers/master/images/marker_blue2.png

    https://raw.githubusercontent.com/Concept211/Google-Maps-Markers/master/images/marker_green3.png

提交回复
热议问题