Google Map icons with VisualRefresh [closed]

孤街浪徒 提交于 2019-11-27 16:46:46
77120

I don't have an official list, but did do some research.

https://mt.google.com/vt/icon/text=A&psize=16&font=fonts/arialuni_t.ttf&color=ff330000&name=icons/spotlight/spotlight-waypoint-b.png&ax=44&ay=48&scale=1

Use that URL and you can easily change the text, size,font and color to your preference,
however the color parameter will only change the color of the text. but if you change waypoint-b.png to waypoint-a.png you get a green marker.


Icon list:

Markers:

Places:

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

   

Traffic:

Miscellaneous:


Look at the URLs and notice the L which can also be S or M, notice the _v_ and _search_ in the names.
At the transit icons you can change large to tiny, mini, and small.

There is probably more. but thats all I have found so far.

Martin Schilliger

According to the answer of «77120» I've used the following:

http://mt.google.com/vt/icon?psize=27&font=fonts/Roboto-Bold.ttf&color=ff135C13&name=icons/spotlight/spotlight-waypoint-a.png&ax=43&ay=50&text=•

But, well, it's not the best way, though it works…


So in the end my code looks like:

function initialize() {
    var mapOptions = {
        center: new google.maps.LatLng(46.951081, 7.438637),
        zoom: 13,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"),mapOptions);

    var marker = new google.maps.Marker({
        icon: {
            url: 'http://mt.google.com/vt/icon?psize=27&font=fonts/Roboto-Bold.ttf&color=ff135C13&name=icons/spotlight/spotlight-waypoint-a.png&ax=43&ay=50&text=•&scale=1'
        },
        position: new google.maps.LatLng(46.951081, 7.438637),
        title:"My Custom Marker",
        animation: google.maps.Animation.DROP
    });

    // To add the marker to the map, call setMap();
    marker.setMap(map);
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!