Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Click handler on layer not working #84

Closed
bdirito opened this issue Dec 10, 2018 · 3 comments
Closed

Click handler on layer not working #84

bdirito opened this issue Dec 10, 2018 · 3 comments

Comments

@bdirito
Copy link

bdirito commented Dec 10, 2018

The demo

https://wykks.github.io/ngx-mapbox-gl/demo/center-on-symbol

does not seem to be working. The layer click handler does not trigger and the mouseEnter & mouseLeave events do not seem to be firing.

Chrome 70
click_hover

@bdirito
Copy link
Author

bdirito commented Dec 10, 2018

It looks like this might have been broken in the fix to my other issue

99a5bb7#diff-29fb98d58b4b6b0d9d914fcd11de79e3

        startWith(true),
        filter(() => !this.MapService.mapInstance.getLayer(this.id)),
        mapTo(false)

Im not a rx expert but to me this implys that the startWith(true) will run though the mapTo(false) meaning that there will never be a call with true. Without fully understanding ngx-mapbox-gl perhaps you want

  filter()
  mapTo()
  startWith()

@dmytro-gokun
Copy link
Collaborator

Same here

@Wykks
Copy link
Owner

Wykks commented Dec 17, 2018

Sorry, I refactored a bit too fast there 😟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants