For those who are not familiar with Web App Builder
, let me tell you first what it is. Web Application Builder is available in ArcGIS webpage before going to the custom development with the Developer edition. Before you start to create a widget that you need to think whether you like an in-panel or off-panel widgets. As name implies, the in-panel widget is living in a penal- it is exactly how panel behaves depending on theme that you are using. While an off-panel widget is a widget that hovers in the map like scale bar and it is the one without a user interface. This in-panel and off-panel article is going into a bit information regarding the specific differences of the two.
By starting a widget development, follow the steps below:
Go to a client, then go to stemapp and choose widgets, and then select the samplewidgets subfolder of the Web App Builder directory.
Copy the folder of the Demo and give it a name like “My Widget”.
Jump to the folder and open the Widget.js file. When opened, there are set of a standard widget handlers defined that you may begin plugging the code into, and to see how the things will work. In addition, you can also change the property of the BaseClass so that it can match your widget.
Go up over few directories to clients- stemapp- sample-configs, where you will see a config-demo.json file. You may open it, then at the bottom you will see all sample widgets being listed there. You can pop your own also by following the example of others.
Start up a Web App Builder if you never own one, then open the app through the URL: http://%5Byourhost name:3344]/webappviewer/?config=sample-configs/config-demo.json.
You must see your own widget included in toolbar and you may begin slamming code there, reload while you are going and to test the changes.
After seeing how tool is working, cracked open a Widget.js and Widget.html file to see these two things:
The HTML never include body or head tags.
It was no doubt, but there might be two things that the guests may too away in the presentation.
1. Have a look on Web Application Builder in ArcGIS Portal and Online before diving to developer Edition- you may be able to do what you need to do without the presence of customization.
2. If you never wish to have a custom feature, a Developer edition can be a great Launchpad, for it gives a great deal for functionality to begin with, and let you focus on custom bits.
So, building your first widget can be fast and easy. But if you want to have a better widget build up, a professional Web App Builder can help.