allenhwkim / angularjs-google-maps

The Simplest AngularJS Google Maps V3 Directive
http://ngmap.github.io
MIT License
1.52k stars 516 forks source link

Custom Markers with Fonts Awesome #815

Open andreadompe opened 7 years ago

andreadompe commented 7 years ago

Hi All, i need to use font awesome like markers, the only way i found is

  <ng-map center="44.706662,7.6703199" zoom="10">
    <custom-marker position="NewYork">
      <i class="fa fa-truck" aria-hidden="true"></i>
    </custom-marker>
  </ng-map>

But on the map the icon is duplicated image

This is my plunker https://plnkr.co/edit/rbUSp01ZpdS4s1KTA1AN?p=preview

How can i do?

Please help me.

wholeinsoul commented 7 years ago

@andreadompe : were you able to find a fix for this ? Thanks.

allenhwkim commented 7 years ago

Plz do like this, and always have a wrapper div when you deal with Angular html.

    <custom-marker position="NewYork">
      <div>
        <i class="fa fa-truck" aria-hidden="true"></i>
      </div>
    </custom-marker>
kartagis commented 6 years ago

I'm sorry for hijacking this, but I have a similar issue; except I also use a ng-repeat. Below is my code. Is it not supported?

<custom-marker ng-repeat="prop in props" position="{{prop.lat}},{{prop.lon}}" title="{{prop.name}}">
     <div>
       <i class="fa fa-print" aria-hidden="true"></i>
     </div>
</custom-marker>

Regards,

kartagis commented 6 years ago

I fixed it by using the code like above, and I'm not sure why it didn't work at the time of my comment.