Extending existing widgets

1789
6
10-23-2017 09:17 AM
Joan_PereAvariento_Vicent
New Contributor II

I am trying to extend a existing widget, using as a parent widget, the OverviewMap widget. The problem that I have is how to load or how to refer the widget parent files without loading the parent widget in the app.

I was following the Nick Brueggemann‌ demo in their presentation. But I think that he load the parent and the enhanced widget in the app.

Anyone can help me? rscheitlin

Thanks in advance.

6 Replies
RobertScheitlin__GISP
MVP Emeritus

Joan,

  My preferred method is to copy the parent widget and rename it (be sure to change all the references in the manifest.json). In the video you linked he is extending the existing widget through sub classing. And that would require the parent widget to exist in your deployed app along with the extended widget (that does not mean that the parent widget has to be added to the app though).

Joan_PereAvariento_Vicent
New Contributor II

Thanks!!

Coping parent widgets and modifying code is the way that i usually use. I would like to develop anything that allow you to separate your code to the original one to make it easier maintaining code.

Thankyou very much. If i develop or find something interesting, i will try to publish and share it.

Joan_PereAvariento_Vicent
New Contributor II

Robert, 

Gavin Rehkemper refer me to his post in a blog where he talk about it. Anyway i would like to develope something that automate the parent widget files to the app when you extend a widget.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Joan,

  I would go with the help you get from Gavin then as I do not use that technique or workflow.

0 Kudos
Raul_Jimenez
Esri Contributor

Jianxia Song‌ / Lemao Wu‌, would you recommend a different technique to Joan Pere Avariento‌?

Thanks!

0 Kudos
JunshanLiu
Occasional Contributor III

Copy and modify is my recommendation.