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

Add a legend to the web map example #73

Closed
2 tasks done
tomwayson opened this issue Aug 27, 2015 · 2 comments · Fixed by #76
Closed
2 tasks done

Add a legend to the web map example #73

tomwayson opened this issue Aug 27, 2015 · 2 comments · Fixed by #76
Assignees
Milestone

Comments

@tomwayson
Copy link
Member

Also use the load event instead of esriRegistry to get a handle to the map object.

Updating the example w/ these changes will help me verify a couple of things that I'm not sure are currently working w/ the web map:

  • will load event even fire if using a web map?
  • should we be setting the esriMap directive's layerInfos using arcgisUtils.getLegendLayers(response) (as shown in this sample) after loading from a web map (regardless if the page includes a legend)?

I think the best case scenario right now would be that it shows all layers in the legend. Worst case would be that the legend doesn't even work.

@tomwayson
Copy link
Member Author

After a quick test, I can say for sure that the map load event is not firing when using a web map.

I've opened a bug for this, see #75

@tomwayson tomwayson added this to the Beta 4 milestone Aug 31, 2015
@tomwayson tomwayson self-assigned this Sep 4, 2015
@tomwayson
Copy link
Member Author

Yep, we did indeed need to be setting the esriMap directive's layerInfos after loading the web map. Without that, it was showing all layers (including the basemap and the basemap labels, etc). After adding it, it showed only the layers as defined in the web map.

This is fixed in 1d64834

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

Successfully merging a pull request may close this issue.

1 participant