- ArcGIS Online Web Map. You may use any web map, while in this description a map of a fictitious fire incident will be used.
- Hosted Template. A web application template will be generated, based on the following map.apps app: http://www.mapapps.de/mapapps/resources/apps/vsr_lab_public/index.html
- ArcGIS Online "Web Mapping Application". The result of combining a web map (1.) and the hosted template (2.) is a ready to use web mapping application, as you can see here: http://www.arcgis.com/home/item.html?id=3de1e7f353874b5e8897de6b0310545b
The map.apps app that is used in this sample, is a reduced version of the app that can be purchased in ArcGIS Marketplace.
Please consider the ArcGIS Online help for more information about Web Application Templates: http://resources.arcgis.com/en/help/arcgisonline/index.html#/About_web_application_templates/010q000000nt000000/.
Preparing ArcGIS Online Organization Settings
You have to modify the organization settings of your ArcGIS Online account to allow users in your organization to select configurable applications as application templates during the workflow "Publish a web map as web application" in ArcGIS Online. This is a global configuration of your organization and only users with administrative rights are allowed to perform this operation.
First create an empty group e.g. "map.apps-templates". This group is used in the organization settings as source for application templates.
Click on My Organization
and then on Edit Settings
.
Select Map
and then select the group "map.apps-templates" in the select box of Web App Templates
.
Registering map.apps Based "Web Mapping Application" Template
Go to My Content
, click on Add Item
.
In the dialog select An application,
choose the option Web Mapping
and enter the URL to your map.apps application, e.g. http://www.mapapps.de/mapapps/resources/apps/vsr_lab_public/index.html.
To enable web map support, the map.apps app has to load the following bundles:
- web map - enables the use of web maps in general
- parametermanager - enables the use of URL parameters
It is important to choose Configurable
in the purpose field.Enter a title and a tag and click Add Item
.
Now the application is created in ArcGIS Online. The next preparation step is to tell ArcGIS Online what configuration parameters are possible.
Click on Edit
and scroll down to the end of the page.
At the end of the page you find a section called Configuration Parameters
. This section expects a JSON definition for possible configuration parameters.
A configuration JSON may look like the following sample, that defines three parameters:
- title - Title of the application
- theme - Name of the application style
- appJson - A partial app.json as parameter, useable to overwrite any parameter in the app.json.
The last step is to Share
the application with the group for templates created previously, e.g. "map.apps-templates".
After finishing these steps, you have registered a map.apps application as a hosted web application template in ArcGIS Online.
Publishing a Web Map Using a map.apps Based Hosted Web Application Template
To use the new web application template you need to publish a web map as a Web Mapping Application. You may select an existing web map and open it in the ArcGIS.com Map Viewer or create a new one. You may also use, this existing web map and save a copy of it to your account: www.arcgis.com/home/item.html?id=a0a3dae690294fe6aa88074263bb0791
Click on Share
.
Click on Make a Web Application
in the following dialog.
Make a Web Application.
Now you will see the previously created map.apps based hosted web application template in the list of available templates.
Select the template and click on publish
.
Select a title for the new application and Save and Publish
it.
After this, you will get a short summary and you can click on go to the item now.
Configuring Your Application
Using ArcGIS Online
Because you have created an ArcGIS Online application based on a hosted and configurable template you get the button Configure App
to jump to the ArcGIS Online preview mode of the application.
Because the new application is not public, you have to sign in with your AGOL account to see the preview.
At the right side of the screen you will see the possible configuration parameters that were defined for this hosted template.
As you can see in the upper right corner of your application, map.apps can directly access user details stored in ArcGIS Online such as full name, email address or profile image.
You can change the settings and click on Save
to refresh the preview view on the left side.
If you are finished configuring the application you can click on cancel
to get back to the ArcGIS Online item.
Using map.apps In-App Configuration
In addition to the ArcGIS Online mechanism described before, you can also use map.apps's integrated app.builder to configure details of your application. To start in-app configuration click on the Configure app
in the lower left corner of your app configuration.
Configure app
button will not appear.After clicking on the button, you can configure your application with all possibilities provided by map.apps.
Once you have finished configuration click on Update Preview
to refresh the app.
If you are finished configuring the application you can click on Save App
to persist your configuration changes. These changes will now be stored directly in ArcGIS Online in combination with your App ID. If you open the map.apps application without appending the appid
parameter you will see, that the changes you made are not active.
The last step is to share the application with your organization or the public.
After this, the URL can directly be opened in any browser: http://www.mapapps.de/mapapps/resources/apps/vsr_lab_public/index.html?&appid=3de1e7f353874b5e8897de6b0310545b