This repository has been archived by the owner on Dec 1, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@tomwayson please review; resolves #203.
I found that it was crucial to keep your original work with getting an immediate reference to a promise for esriLoading a
MapView
orSceneView
module. Without this--and instead AMD loading within thesetMap
method--sometimes I'd find myself outside of the Angular digest cycle and nothing would load in a<esri-*-view>
directive.Ultimately, this code now constructs a new
MapView
orSceneView
with all options + a valid map instance inside of thesetMap
method.Otherwise, just for illustration, I added a button to change the
map
property for the scene-view and feature-layer test pages. You'll see that the feature-layer test page will not behave 💯% right when attempting to change the map property, and I think this has to do with the original map having layers. Remove the layers yourself in the sample code, run it again, and then it should be fine when switching out the map.