google-map-marker icon using iron-icons

183 views
Skip to first unread message

Paul Rondeau

unread,
Jul 22, 2015, 1:58:45 PM7/22/15
to Polymer
I'm looking for a way to set the icon for a google-map-marker, ideally I could use the iron-icons as they are already being used elsewhere in my project. I cannot find a way to set the icon marker properly. 

Going off of the iron-icon element, I've tried: 
 
<link rel="import" href="../bower_components/iron-icons/iron-icons.html">
 

<google-map-marker latitude="37.7749295" longitude="-122.41941550000001" icon="favorite">
</google-map-marker>

Custom icons work by setting: icon="someImg.png", but I'd really like to use the iron-icons for this. 
Other icons work on the page within iron-icon tags:

<iron-icon icon="favorite"></iron-icon>

Am I doing something wrong or is there a workaround for this?

Thanks

Eric Bidelman

unread,
Jul 22, 2015, 4:09:45 PM7/22/15
to Paul Rondeau, Polymer
Hi Paul,

Right now, it's `icon` attribute is a simple URL to an image. The map marker element would need to be taught how to use the svg images within the iron icon set. The maps API takes a URL to an image as well: https://github.com/GoogleWebComponents/google-map/blob/master/google-map-marker.html#L236


Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/f4d55c4d-a42a-49f4-8d2b-8d3dbe610f39%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul Rondeau

unread,
Jul 22, 2015, 5:11:05 PM7/22/15
to Polymer, ebi...@gmail.com
Okay thanks for your help Eric! 

I've submitted the request:
Reply all
Reply to author
Forward
Message has been deleted
0 new messages