Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Enabled adding/removing layers after map creation #51

Merged
merged 2 commits into from
Sep 15, 2015

Conversation

eas604
Copy link
Contributor

@eas604 eas604 commented Apr 17, 2015

This change binds the map's layers to $scope so that they can be added/removed dynamically after map creation and so they can be used in ng-repeat, e.g.:

<esri-map>
    <esri-feature-layer ng-repeat="url in someCollection" url="{{url}}">
    </esri-feature-layer>
</esri-map>

A simple example is at test/add-remove-layers.html.

I know that this module isn't intended to support all JSAPI features, but I thought someone might find this feature useful.

@tomwayson
Copy link
Member

Thanks @eas604. I've been thinking that we'd need to add scope to the layer directive to support binding future properties (visibility, opacity, etc) to the controller's scope - so having a working example like this is great! Especially since you've bound it to a collection, that's a good idea. I'd like to review this w/ some others this week, but basically I'm in favor of merging this.

@tomwayson tomwayson self-assigned this Apr 21, 2015
@tomwayson tomwayson modified the milestone: Beta 4 Aug 18, 2015
@tomwayson tomwayson removed their assignment Aug 18, 2015
@tomwayson tomwayson modified the milestones: Beta 4, Beta 5 Sep 4, 2015
@tomwayson tomwayson self-assigned this Sep 15, 2015
@tomwayson tomwayson merged commit 1b6fdaf into Esri:master Sep 15, 2015
@tomwayson
Copy link
Member

@eas604 thanks for your patience w/ this!

@eas604
Copy link
Contributor Author

eas604 commented Sep 15, 2015

No problem. Thanks for merging!

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

Successfully merging this pull request may close these issues.

2 participants