As you know, the AGS javascript API is developed based on dojo. One of the reasons for choosing dojo is that developers of the ags js api think this library has the best compatibility. I have never studied dojo, but after seeing extjs, I am not very interested in Dojo. Many people think that extjs is not good. Of course, this is simply a matter of benevolence and wisdom.
I like to write the UI using extjs, but the map part must be written using the ags js api. How can I make mashup the two? In the past, ESRI Cao Xin introduced me to a devsummit09 example. The content in it was very inspired. Later, he saw what he wrote with extjs at the ESRI China 09 exhibition, however, at that time, I was subject to technical resistance and switched to openlayers to implement the map function. I have collected things over the past few days. Combined with some examples on the internet, I think it should be quite simple.
My integration is divided into two steps: one is to implement the effect of the ags js api in the extjs framework; the other is to integrateCodeConvert to an ext extension component. Compared with prototype first, and then refactoring. After several days of pondering, the general problem is basically fixed, and the effect is very good.
The following figure shows the results:
Interface
Drawing
You can set the color and transparency of the drawing.