Using Icon Fonts as Markers in Google Maps V3 -


i wondering whether possible use icon font icons (e.g. font awesome) markers in google maps v3 replace default marker. show/insert them in html or php document code marker be:

<i class="icon-map-marker"></i> 

here's attempt @ same thing (using "markerwithlabel" utility library) before realised nathan did same more elegantly above: http://jsfiddle.net/f3xchecf/

function initialize() {      var mylatlng = new google.maps.latlng( 50, 50 ),         myoptions = {             zoom: 4,             center: mylatlng,             maptypeid: google.maps.maptypeid.roadmap             },          map = new google.maps.map( document.getelementbyid( 'map-canvas' ), myoptions ),       marker = new markerwithlabel({        position: mylatlng,        draggable: true,        raiseondrag: true,        icon: ' ',        map: map,          labelcontent: '<i class="fa fa-send fa-3x" style="color:rgba(153,102,102,0.8);"></i>',        labelanchor: new google.maps.point(22, 50)      });      marker.setmap( map ); }  initialize(); 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -