This article provides instructions for:,
- Setting up a Web AppBuilder (Developer Edition) widget
- Integrating Nearmap Obliques into the widget
Intended audience
- Users testing Nearmap Oblique for ArcGIS Web AppBuilder widget
- Users without administrator access to ArcGIS Portal
- Users with basic web development experience
Prerequisites
- An ArcGIS Online account
- A copy of the Nearmap Oblique Web AppBuilder widget
- Nearmap API key with Nearmap Oblique for ArcGIS
- Administrator access to ArcGIS Online (optional)
Running Nearmap Obliques in Web AppBuilder
Download the Web AppBuilder
- Download the Web App Builder using this link.
- Extract the ZIP file to a local folder to override the default host on which the app runs.
Run the application
- Run the Web AppBuilder application startup.bat.
Edit the hosts file
Proceed with using HTTPS on localhost. To do this:
- Open the hosts file, which is located in the windows/system32/drivers/etc folder, in a text editor.
- In the hosts file, add an entry for
localhost with a domain. For example, "mylocal.com". You can set it to anything you want and save the file.
NOTE: The domain name becomes more relevant if you have multiple developers in your organization. Each developer can set up their own local host name and that saves your ArcGIS administrator from configuring multiple entries in the security settings in your organization. - Navigate to the above URL in a browser with
https://mylocal.com:3346. 3346 is the port on which the Web app Builder Developer Edition runs. A security exception prompt will be displayed. - Click the link below the message to proceed.
Add your Web AppBuilder URL to ArcGIS Online
- Open ArcGIS Online in a browser.
- Go to Settings, General, Security.
- Go to the Allow origins section, and add the URL of your Web AppBuilder including the port. From the example above,
https://mylocal.com:3346. This will be used several times during the configuration. - Click Add domain.
- Return to the previous tab with your URL and specify the URL to your ArcGIS Online organization or Portal for ArcGIS.
Generate an App ID
Create and register Web AppBuilder to obtain an App ID.
- Go to ArcGIS Online.
- Under the Content tab, click Add Item, An application. The Add an application dialog is displayed.
- Select the Type as Web Mapping, Purpose as Ready To Use, and API as JavaScript.
- In the URL field, paste your URL of your Web AppBuilder.
- Assign a Title and add any relevant Tags.
- Click Add Item.
- Go to the Settings tab. In the App Registration section, click Register to generate an App ID. The Register dialog is displayed.
- Leave the App Type as Browser.
- In the Redirect URL field, paste the URL of the Web AppBuilder, and click Register. App details including the ID are displayed.
- Copy the App ID shown on the page.
- Go to your Web AppBuilder and paste the App ID for Web AppBuilder registered in the portal specified in step 7.
- Click Continue. A page requesting permission to authorize the application.
Authorize the app
- Click Allow. You have now got a working Web AppBuilder.
Set up Oblique Viewer
- Go to the widgets directory. For example,
c:/WebAppBuilderforArcGIS/client/stemapp/widgets. - Install Nearmap Oblique Viewer by copying and pasting Oblique Viewer files into the widgets directory. This will make it available to all local Web AppBuilder applications.
Create a new web app
- Go to your Web AppBuilder and create a new Web App.
- Give it a Title, Description. An app is created.
Add and configure a new widget
- From the Widget tab, select Widget. The list of all available widgets is displayed. Scroll through the list to find the Oblique Viewer widget and click to select it.
- Click OK. The Configure Oblique Viewer for Nearmap dialog is displayed.
- In the Nearmap API Key field, paste your Nearmap API key. The key needs to have the Oblique ArcGIS product.
- Click OK.
- Click Save.
- Click Launch to run the app.
- From the app, click the widget icon to load an oblique photo in the center of the map. You can take measurements, zoom, pan, change the orientation and switch between surveys.