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

Add 'mapable' mixin #10

Closed
chrismayer opened this issue Apr 13, 2018 · 0 comments
Closed

Add 'mapable' mixin #10

chrismayer opened this issue Apr 13, 2018 · 0 comments

Comments

@chrismayer
Copy link
Collaborator

chrismayer commented Apr 13, 2018

Instead of binding the OpenLayers map manually to every component, which needs a reference to it it would be useful to encapsulate this in a mixin. The mixin could be named like 'mapable' and has to do the following:

Listen to the ol-map-mounted event of the event-bus and bind the map as member variable of the component:

      WguEventBus.$on('ol-map-mounted', (olMap) => {
        // make the OL map accesible in this component
        me.map = olMap;
      });
@chrismayer chrismayer changed the title Add 'mapable' directive Add 'mapable' mixin Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant