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

Map Mixin #396

Closed
wants to merge 1 commit into from
Closed

Map Mixin #396

wants to merge 1 commit into from

Conversation

gobsmack
Copy link

I created a mixin to encapsulate the MapLoader logic. I used a Mixin rather than factoring out the MapLoader, as discussed in PR #395. I borrowed heavily from @DavidSpriggs controller-with-mixins-dave branch (how to reference?).

  1. Made the initMap method async, and named it such, so that a custom mixin could accommodate creating a map from AGO.
  2. Handled the layers-add-result event, checking the status of each added layer.
  3. Created "warnings" to preserve the existing behaviour which allowed the map to load even if one or more layers were invalid.
  4. Delayed second stage of building Panes because for an async map, the "this.map" object is not created until after the map is loaded. The panes code is not too clear for me, so I did not refactor this, and this may need deeper review from somebody more familiar.
  5. Moved the switch to Mobile Popup out of the initMap method, because it didn't seem like it should be part of the Mixin, but rather the Controller.

Also:

…method Async so other mixins can accommodate creating a map from AGO. Created "warnings" to allow the map to load even if one or more layers were invalid. Delayed second stage of building Panes because for an async map, the map's domNode is created async.
@DavidSpriggs
Copy link
Member

@gobsmack Update: we are reviewing this.

tmcgee added a commit that referenced this pull request Apr 29, 2015
@tmcgee
Copy link
Member

tmcgee commented Apr 29, 2015

I've added this map mixin to a new branch with additional Controller mixins for further discussion.

@DavidSpriggs
Copy link
Member

This will be coming. Closing PR as we will incorporate this via another branch.

@tmcgee tmcgee added this to the v1.4.0 milestone Nov 23, 2015
@tmcgee
Copy link
Member

tmcgee commented Nov 23, 2015

this mixin for maps was included in PR #475

@tmcgee tmcgee removed this from the v1.4.0 milestone Mar 8, 2016
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 this pull request may close these issues.

3 participants