问题
Is there a way to access the colored markers with a letter from google?
I can only use the red ones with letters like

But I need green markers with a letter like I get it from the directions API from google. Like this one here

Is there a way to access to the colored markers with letter? Or do I have to add the markers to my image folder?
回答1:
You must use :
http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=D|00FF00|000000
chld
parameter is the letter you want to appear in your marker.
After the pipe, the first RGB code is the color of the marker, the second is the background color of the marker. The last one is optional.
So you can create your marker like this :
var myPin= new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=D|00FF00|000000");
and use it like you want !
来源:https://stackoverflow.com/questions/20267428/google-map-api-marker-with-letter-on-map