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

Measurement widget #150

Closed
MichelleJean28 opened this issue Feb 24, 2017 · 7 comments
Closed

Measurement widget #150

MichelleJean28 opened this issue Feb 24, 2017 · 7 comments

Comments

@MichelleJean28
Copy link

Could you provide the code for the Measurement widget?
JS 4.x does not support this widget, but it should work in calcite-maps JS 3.x.
Thank you!

@tmcgee
Copy link

tmcgee commented Feb 25, 2017

Hi @MichelleJean28,

I encourage you to check out my repo which integrates the open source project CMV (Configurable Map Viewer) with Calcite Maps. It includes the Esri Measurement widget as well as a number of other core widgets and many widgets contributed by the CMV community. I am one of the lead developers for the CMV project. The initial version of my repo uses the Esri JS API 3.x version as a proof of concept. I have another repo that integrates CMV, calcite maps and the Esri JS 4.x version that will soon be public. I plan to add more capabilities as CMV and Calcite Maps continue to evolve. I hope this helps.

@MichelleJean28
Copy link
Author

Hi @tmcgee,

Thank you, CMV with Calcite Maps looks really great with all these widgets.

I would like to use it as a web app template. Is there a way to automatically use the layers available in the web map? In viewer.js each layer has it's own URL inserted manually.

@tmcgee
Copy link

tmcgee commented Feb 26, 2017

Hi @MichelleJean28,

Sure you can use a webmap. Full support for the current webmap specification was added to CMV a few months back. You just need to provide the webMapId in viewer.js. You can even mix and match layers and widgets defined in the webmap with additional operational layers and widgets within those sections of viewer.js.

A couple of additional comments...

  1. If you are working with a Portal webmap instead of one at arcgis.com, you will need to change the arcgisurl from the default. I believe you can also retrieve the full webmap json from portal and just use that. I don't work with portal at all so not sure these approaches have been fully tested.

  2. I noticed that another developer commented out the webmap mixin in a recent update to cmv. (It needs to be un-commented at 3 places in that file) I have asked him if there is a reason for that. I suspect it unintentional and we'll have that remedied in the next few days.

If you need additional support with cmv and cmv-calcite-maps, we can support you within those GitHub repos or in our Gitter chat room.

EDIT: Forgot to mention that if you need more widgets beyond the CMV core and contributed widgets, many of the widgets for WebApp Builder will work too using the method I've documented here. We are working to integrate that fully within cmv just as we did for webmaps. I have not tried to use those WAB widgets with Calcite Maps (or a webmap). There may well be some css style issues with the conflicting WAB and Calcite themes.

@alaframboise
Copy link
Contributor

@tmcgee awesome work and thank you. I'll dig into this more after devsummit.

@alaframboise
Copy link
Contributor

@MichelleJean28 We don't have a measurement widget quite yet for 4.x, but when it's available it will be here in the master4 branch.

https://github.com/Esri/arcgis-js-api/tree/4master

@MichelleJean28
Copy link
Author

This has been very helpful, thank you @tmcgee for the quick and comprehensive support. You are doing a great job with CMV.

@MichelleJean28
Copy link
Author

Thank you @alaframboise

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

No branches or pull requests

3 participants