angular-google-maps icon indicating copy to clipboard operation
angular-google-maps copied to clipboard

Custom icon only works on ui-gmap-markers and not a singular marker

Open intellix opened this issue 11 years ago • 20 comments

Trying to use a custom icon, but can only get it working when using <ui-gmap-markers>. I can see it working on your example, which is confusing as I don't see the difference/cause.

I've created a simple plnkr with both, which highlights the issue: http://plnkr.co/edit/6tKWteGE6iu0pEY9d21F?p=preview

intellix avatar Jul 26 '15 10:07 intellix

+1

leocaseiro avatar Aug 07 '15 00:08 leocaseiro

+1

TrickMist avatar Aug 07 '15 13:08 TrickMist

If you set the icon inside options, it works for ui-gmap-marker: http://plnkr.co/edit/2JxtGRoc3jcbf4hM0AA8?p=preview

leocaseiro avatar Aug 10 '15 00:08 leocaseiro

I can probably look at this, it's a simple model issue.

solidspark avatar Aug 11 '15 06:08 solidspark

@solidspark thanks

nmccready avatar Aug 11 '15 14:08 nmccready

+1, I am also seeing the icon attribute not working on the marker directive. I have to use options for it. A fix to bring the implementation back to matching the documentation is much appreciated.

ecbrodie avatar Aug 16 '15 19:08 ecbrodie

wow, I wasted a lot of time on this. How do I vote that this is a priority?

krewmarco avatar Aug 29 '15 04:08 krewmarco

Why not just use markers?

nmccready avatar Aug 29 '15 15:08 nmccready

marker = 1 marker = 2+

Anyway, as I said before, set the icon inside options. If you just update the documentation, so that would be ok.

leocaseiro avatar Aug 31 '15 04:08 leocaseiro

Yes, markers work great for this. I just couldn't find it in the docs.

krewmarco avatar Aug 31 '15 18:08 krewmarco

I am sure this fix is dead simple; is anyone else still looking into the code base for this?

nmccready avatar Aug 31 '15 18:08 nmccready

Problem code is either in here https://github.com/angular-ui/angular-google-maps/blob/master/src/coffee/directives/api/models/child/marker-child-model.coffee

or here

https://github.com/angular-ui/angular-google-maps/blob/master/src/coffee/directives/api/marker.coffee

nmccready avatar Aug 31 '15 18:08 nmccready

I don't really care whether custom icon path is defined in marker.icon or marker.option.icon. It looks so trivial that this undocumented "feature" results in hours of

adyba avatar Sep 09 '15 14:09 adyba

lol, I am putting the lines out there so some one else can work on this besides me. So keep banging your head while you wait. Or attempt to solve the issue. I am just trying to help while many complain.

nmccready avatar Sep 09 '15 14:09 nmccready

While your at it document the problem on the wiki, and or website which you can contribute to.

nmccready avatar Sep 09 '15 14:09 nmccready

perhaps this issue can be closed

leocaseiro avatar Sep 12 '15 04:09 leocaseiro

I can make it work with singular, just got to do it. It's not hard , just gotta find the time.

nmccready avatar Sep 12 '15 18:09 nmccready

So leave it open as an enhancement.

nmccready avatar Sep 12 '15 18:09 nmccready

:+1:

leocaseiro avatar Sep 13 '15 13:09 leocaseiro

Check your closing element its markers not marker :) <ui-gmap-marker idKey="marker.id" coords="marker.coords" icon="marker.icon"></ui-gmap-markers>

sameershenai avatar Mar 16 '16 06:03 sameershenai