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 support for webmaps #626

Merged
merged 2 commits into from Nov 2, 2016

Conversation

Projects
None yet
3 participants
@tmcgee
Copy link
Member

tmcgee commented Nov 1, 2016

Adds support for webmaps as basis for CMV application per current specification

  • All layer types supported by webmaps are added as operational layers. reference
  • basemap gallery, measure, routing (directions), and search widgets are added to CMV widgets if included in webmap. reference
  • Bookmarks included in webmap are added to bookmarks widget. reference

This support is intended to complement existing CMV functionality.

  • Operational Layers not in the webmap can be included in CMV app configuration.
  • Widgets supported by webmap can augmented or excluded in CMV configuration.
  • All core CMV widgets work without modification
  • Most contributed widgets should work without modification

@tmcgee tmcgee added the feature label Nov 1, 2016

@tmcgee tmcgee added this to the v2.0.0-beta.1 milestone Nov 1, 2016

@DavidSpriggs

This comment has been minimized.

Copy link
Member

DavidSpriggs commented Nov 2, 2016

@tmcgee This is excellent! Great work!

@DavidSpriggs DavidSpriggs merged commit a91290c into develop Nov 2, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@DavidSpriggs DavidSpriggs deleted the feature/add-support-for-webmaps branch Nov 2, 2016

@roemhildtg

This comment has been minimized.

Copy link
Member

roemhildtg commented Nov 2, 2016

👍

@roemhildtg

This comment has been minimized.

Copy link
Member

roemhildtg commented on viewer/js/config/viewer.js in 0ffeae6 Nov 17, 2016

Just wondering, why did we get rid of the basemap widget?

This comment has been minimized.

Copy link
Member

tmcgee replied Nov 17, 2016

@roemhildtg That is not intentional. Original basemap should remain as a widget included by default.

That widget was removed only for testing the automatic addition of a Basemap Gallery widget from the webmap. But only if there wasn't a basemap widget or basemap gallery widget already included in the app determined by widget id.

This comment has been minimized.

Copy link
Member

roemhildtg replied Nov 17, 2016

Ah, This is so cool by the way, it works really well in the little test I did!

This comment has been minimized.

Copy link
Member

tmcgee replied Nov 17, 2016

Great! I added this functionality in as complete form as I could with that exact intent to get more feedback, adoption and contribution. 😄

@roemhildtg

This comment has been minimized.

Copy link
Member

roemhildtg commented on viewer/js/viewer/_WebMapMixin.js in 0ffeae6 Nov 17, 2016

I can't seem to get the bookmarks to work. Have you been able to test that part? It seems to fail right around here in the widget mixin:

tp = new FloatingTitlePane(options).placeAt(placeAt, widgetConfig.position);

This comment has been minimized.

Copy link
Member

tmcgee replied Nov 17, 2016

Do you have an existing bookmarks widget in your config or is this failing when attempting to add a new widget?

This comment has been minimized.

Copy link
Member

roemhildtg replied Nov 17, 2016

I've tried it without the existing widget in the config.

This comment has been minimized.

Copy link
Member

tmcgee replied Nov 17, 2016

hmm. well either the widget config I have on line 116 is incomplete or invalid or there's something bad in the bookmarks. Check out the bookmarks in the webmap to verify they are as you would expect. I suggest you also try adding the widget directly into the viewer.js config to see if that reveals any issues.

This comment has been minimized.

Copy link
Member

roemhildtg replied Nov 17, 2016

I think I figured it out. It was that I had a widget called measurement and the mixin looks for a widget with the id measure. So that must've been causing some issue.

This comment has been minimized.

Copy link
Member

tmcgee replied Nov 18, 2016

So it was the measurement widget that caused the issue not the bookmarks widget? I think it will have to be up to developer/user to avoid those types of conflicts between what exists in their app config and what is in the webmap. If there are ways we can make that easier to identify those conflicts that would be a good thing.

This comment has been minimized.

Copy link
Member

roemhildtg replied Nov 18, 2016

Yeah, it seems it was the measurement conflict, even though the error occurred when the widgetMixin was trying to load the bookmarks. It doesn't make sense, but after changing my measurement widget id to measure it worked. Its so tough to diagnose though since the error message wasn't super helpful, especially since the esri code is all compressed. I don't know of a good way to make it better though either...its just so tricky debugging esri apps.

@roemhildtg

This comment has been minimized.

Copy link
Member

roemhildtg commented on viewer/js/viewer/_WebMapMixin.js in 0ffeae6 Nov 17, 2016

How do I enable the basemapGallery? afaik, its enabled in the webmap?

This comment has been minimized.

Copy link
Member

roemhildtg replied Nov 17, 2016

image

This comment has been minimized.

Copy link
Member

roemhildtg replied Nov 17, 2016

I'm not seeing the basemap gallery or the routing though.

This comment has been minimized.

Copy link
Member

tmcgee replied Nov 18, 2016

I really don't know how that happens in the webmap since neither I nor any of my customers use them. I just followed the spec and tested with the variety of webmaps that @ERS-Long had provided me.

I did not try a webmap that had "Routing" widget so that's the only one that wasn't tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment