谷歌地图图标与VisualRefresh

如何在使用VisualRefresh设置时使用Google地图的“新”默认图标?

默认图标是: http : //mt.googleapis.com/vt/icon/name=icons/spotlight/spotlight-poi.png&scale=1

以前的地址如下所示: http : //maps.google.com/mapfiles/marker_green.png ,但在同一张地图中使用新旧图标看起来不太好。

我没有一个官方的名单,但做了一些研究。

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

使用该url,您可以轻松地根据自己的喜好更改文字,大小,字体和颜色,
但是颜色参数只会改变文字的颜色。 但如果将waypoint-b.png更改为waypoint-a.png,则会显示一个绿色标记。


图标列表:

标记:

地点:

交通:

杂:


看看url,注意L也可以是SM ,注意名字中的_v__search_
在交通图标,你可以改变largetinyminismall

可能还有更多。 但那是迄今为止我所发现的。

根据“77120”的答案,我使用了以下内容:

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=•;

但是,好吧,这不是最好的方法,虽然它的工作…


所以最后我的代码看起来像:

 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); } 
Interesting Posts