Select to view content in your preferred language

Is there a general method to take a widget from the viewer and use it with the API ?

715
7
Jump to solution
02-06-2012 07:28 AM
Mohammed_YassineAYACHE
New Contributor III
Hi everybody !

I'm developping an application with the ArcGIS API for Flex, and I want to implement some tools like the widgets existing in the Flex Viewer (Draw and Mesure, OverviewMap, Printing, ...).

I had already integrated the Navigation Widget thanks to this post (special thanks for Robert Scheitlin), and I want to integrate other widgets.

So, is there a method or steps to follow for transforming a widget from the viewer to a standalone tool, which is able to be integrated in an application developed by the API (exactly like Robert has done with the Navigation Widget) ?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Mohammed_YassineAYACHE
New Contributor III
hi rosen,
you'll find attached to the following post a test project of the print widget :

http://forums.arcgis.com/threads/49935-Error-in-Printing-the-map?p=172305&posted=1#post172305

View solution in original post

0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus
Mohammed,

   There are no quick guideline to do this. It is all about experience in working in the Flex API and an understanding of widgets and their interation with the map. The best thing you can do is look at the code and determine what needs to be decoupled from the viewer framework. Your path is not going to be easy. Here is another widget that I made the search widget that have been customized to work outside the Flex Viewer framework. There is alot of good code in this widget to teach you what needs to be dene.

http://www.arcgis.com/home/item.html?id=2d2ccae108b74b1ba8968e21c730bdb4


Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:
0 Kudos
TracySchloss
Frequent Contributor
I think the navigation widget is different than a lot of the other widgets because navigation is sort of standalone anyway (only deals with the map, not any of your layers etc).   I wouldn't expect to see hardly anyone pulling apart the widgets and converting them to standalone.

I wouldn't recommend that you even try.  There is a lot of overhead involved that keeping the widget interaction going that completely falls apart once you start to use just parts of a widget .  (Unless you're a programmer, then go for it!)   Otherwise, if there are certain pieces of functionality you need, there are lots of examples in the API reference. 

Personally I'm not a fan of the widget approach because I see people put a lot of extra tools in their map because they're easy to add, not because they really need them.  I seem to be in the minority, though.
0 Kudos
Mohammed_YassineAYACHE
New Contributor III
Thanks a lot Robert, the search widget was very helpful for me. I extracted from it the window template to use it in other tools, and I will focus on the API to develop many of them.
there is still a lot of questions in my mind, but I will post them later.
thanks !
0 Kudos
rosendimitrov
New Contributor
Hi would you be so kind to share the draw and measure , and printing ?thanks a lot
0 Kudos
Mohammed_YassineAYACHE
New Contributor III
hi rosen,
you'll find attached to the following post a test project of the print widget :

http://forums.arcgis.com/threads/49935-Error-in-Printing-the-map?p=172305&posted=1#post172305
0 Kudos
rosendimitrov
New Contributor
Thank u very much for the responce, i could share also some stuff with u , like selection widget.could u be so kind to give me the draw and measure tool.im having really bad issue with that stuff
0 Kudos
Mohammed_YassineAYACHE
New Contributor III
Rozen,
I'm still working on draw and measure widget. I will share it when it is ok.
if you have some other widgets, it will be so kind to share them in order to save time for developping others.
thanks a lot.
0 Kudos