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

icon='{expression}' behaves differently between markers and marker

Open simonh1000 opened this issue 12 years ago • 10 comments

Hi Love the project, and +1 to the calls for Street View.

In brief, I get the default marker for my markers, while I the specific one loads for marker. The docs both talk about '{expression}' so I'm confused about what I am doing wrong.

<google-map center="map.center" zoom="map.zoom" draggable="true"> <markers models='qnames' coords="'pos'" icon='map.marker.icon'></markers> <marker coords='map.marker.pos' icon='map.marker.icon'></marker> </google-map>

simonh1000 avatar Mar 20 '14 12:03 simonh1000

More info would help. I am not sure what the problem really is.

Can you make an example on jsbin where the issue is more explicit. I can give you a template to mess with.

nmccready avatar Mar 20 '14 13:03 nmccready

http://jsfiddle.net/nmccready/95xA6/

nmccready avatar Mar 20 '14 13:03 nmccready

or http://jsbin.com/wejup/1/

nmccready avatar Mar 20 '14 13:03 nmccready

http://jsfiddle.net/hotbelgo/hZAQ5/

See how the single marker uses a green dot as icon while the markers, which use the same expression for their icon, are wrongly rendered with the default red google icons. In other words, what is the right format to tell marker_s_ to use a different icon, as I can only get it to work for individual marker?

image

simonh1000 avatar Mar 20 '14 14:03 simonh1000

I'm experiencing this too

oliw avatar Mar 23 '14 19:03 oliw

Hey guys, I came across this issue as well. The problem is the documentation calls for an expression but what it really wants is a string, like coords, which represents a key on each marker that contains the icon url. Using your jsbin from above: http://jsfiddle.net/sharpone/6FjTR/

sharpone74 avatar Apr 13 '14 16:04 sharpone74

Thanks @sharpone74 ! That worked for me =)

dgavigan avatar Apr 21 '14 15:04 dgavigan

Wow! just what I was looking for! Works!

BerkeleyTrue avatar May 06 '14 20:05 BerkeleyTrue

If you want better docs, website-develop is more complete. 1.1.0 milestone tickets are shrinking. It should be done soon.

sent from my mobile device,

Nicholas McCready

Personal Email: [email protected]

Web site: http://codemonkeyseedo.blogspot.com/

Twitter: nmccready

On May 6, 2014 4:35 PM, "Berkeley Martinez" [email protected] wrote:

Wow! just what I was looking for! Works!

— Reply to this email directly or view it on GitHubhttps://github.com/nlaplante/angular-google-maps/issues/316#issuecomment-42355306 .

nmccready avatar May 06 '14 20:05 nmccready

Trying to clean up issues, if this still exists, please re-open with a plnkr demonstrating the issue.

cthrax avatar Aug 03 '14 16:08 cthrax