AckerApple / agm-overlays

Custom marker overlay for the @agm/core package
MIT License
25 stars 24 forks source link

Not able to open agm-snazzy-info-window using agm-overlays #7

Closed swatisrivastav closed 6 years ago

swatisrivastav commented 6 years ago

I need to open agm-snazzy-info-window with the agm-overlays but I am unable to do so. Can you help?

AckerApple commented 6 years ago

Haven’t heard of it but will look into next week unless someone else can get to it

swatisrivastav commented 6 years ago

I am also not able to close agm infowindow by clicking outside on the map. Please help.

AckerApple commented 6 years ago

Yup, next week. Try the demo page to see if it works there. This code is in use by many and in production on our servers

AckerApple commented 6 years ago

Also I don’t know if the info windows are supposed to close when you click outside. That just might be what you expect.

AckerApple commented 6 years ago

I did my research on your reported issue:

  1. agm-snazzy-info-window only works when its @Host() is matched to an AgmMarker class 1.1 As seen in this link, the agm snazzy code will only work when AgmMarker class is found 1.2 The only foreseen way to make AgmOverlay work with snazzy info window, is to have AgmOverlay inherit aka extend AgmMarker on this linked line of code 1.3 I've tried extending AgmMarker in the past and remember too many incompatibilities had me walk away from inheriting AgmMarker in the past

  2. Not able to close agm infowindow by clicking outside the map 2.1 I have found that this is just how agm-info-window works and I too like it that way 2.2 No changes will be made

So, I don't care much at all about some snazzy info window and I am happy with how things are the way they are. You will need to make a pull request, a giant one that has AgmOverlay extend AgmMarker, to get these requested features of yours.

swatisrivastav commented 6 years ago

If so then can we prevent on agm-overlay click, when call the output event (mapClick) of agm-map? As the agm-overlay is clickable on this event but agm-marker does not reach on (mapClick)

AckerApple commented 6 years ago

Please reread yourself and try again. I’m having a hard time relating and coralating your issue to your last message’s request

AckerApple commented 6 years ago

I think you’re asking me to hack the events to have an info window close auto close on click outside........ if so, again, I’m happy with how things work. You will find no changes to come from here for that request.

I’m just going to close this issye

swatisrivastav commented 6 years ago

I am talking about point no. 2.. "Not able to close agm infowindow by clicking outside the map". As if I use agm-map click event to close agm-info-window then it also result same when I click on the agm-overlay.

swatisrivastav commented 6 years ago

I think you are very unclear on the developers request. If so feel free to go with your flow which definitely have a bug. If a map has info window open then it must be close if click on the map. you can check it with agm-marker. Since you have created an overlay which works like a marker then it must have that feature too. And Snazzy-info-window is nothing but a customize agm info window, that must be suppose to work on this flow. But its unfortunately not happening. You close this issue as I found my solution editing your directive.

AckerApple commented 6 years ago

So issue a pull request. Learn the ropes. Your approach to getting what you want is terrible. I have no desire to lift a finger for you.

I have agm regular markers on the demo page, they don’t close unless you close them

lehne commented 5 years ago

I solved this by making standalone snazzy-info-windows and then showing them with a (click) handler on the overlay. Not as easy, but it works.