Nearby

The Nearby template is based on the Nearby web application. This template provides a native app experience to discover nearby locations and includes filters to narrow your search by distance or feature category. 

When you create an app from this template, you provide a title to create the app. Use the Settings  tool to customize your Nearby app.

Requirements

The requirements for using the Nearby template are as follows:

  • Provide Nearby web apps. These can be a single valid item ID, the ID for a group that contains multiple Nearby web apps, or a search query that contains multiple item IDs.
  • Nearby web apps can be public or secured. To access a secured web app in your ArcGIS Online organization or  ArcGIS Enterprise portal using OAuth2, register your app and provide a client ID. For more information, see Sign your app. By default, only public Nearby web apps appear in the Nearby gallery. To access secured Nearby web apps, click   Settings > Licensing > Gallery and provide a client ID.
  • Optionally, if you want to see turn-by-turn directions in the Nearby template app using the ArcGIS routing service, you will need to provide an API key by clicking Settings > Properties > Gallery, or enable the support secured web apps property in Settings and ask end users to sign into the Nearby app.

Customize your app

Once you create your app, you can customize it by changing the app settings.

Start AppStudio and, in the side panel, click Settings  and Properties. The following table lists the contents of the tabs on the  Nearby Properties   tab, sorted by the tab on which they appear, and their purposes. You can also modify the properties directly in the app's appinfo.json file. If you change any of these properties, click  Apply   to save them before starting your app again.

Start Screen tab contents

PropertyJSON nameTypeDescription

Background image

startBackground

String (image URL)

Image to use for the start page background.

Brand color

brandColor

String (color value)

Color to use as the primary color.

Title font file

mediumFontTTF

String (font file URL)

Sets the custom title font to be used throughout the app. This font will be used in headings, page titles, and so on.

Text font file

regularFontTTF

String (font file URL)

Sets the custom text font to be used throughout the app. This font will be used in descriptions of photos, about text, and so on.

Feedback email

feedbackEmail

String (email ID)

Email address to which user feedback should be sent.

Show disclaimer

showDisclaimer

Boolean (true|false)

Shows the disclaimer text as a pop-up in the app. This text is the content from the Access and Use Constraints section of the Details tab.

Gallery tab contents

PropertyJSON nameTypeDescription

Nearby web apps

galleryMapsQuery

String

Enter an ArcGIS query to list valid Nearby web apps in the gallery. This can be a single valid item ID of the web app such as id:0b28ef391fe44fc5bc2b0bcd3f5bbbcb or a group ID containing multiple web apps such as group:47597bdf4b6d49fd85c0f4175a6e7b60, or a search query with multiple web app item IDs such as (id:0b28ef391fe44fc5bc2b0bcd3f5bbbcb OR id:6efd8324a57247c79a7ec9a66a9bf581).

Total results to show in gallery

maxNumberOfQueryResults

Number

Enter the maximum number of web apps that should be returned from querying the portal.

Portal URL

portalUrl

String

URL of the portal to query for Nearby web apps.

Support secured web apps

supportSecuredMaps

Boolean (true|false)

Provides the ability to sign in to an organization for access to secured web apps per the query parameters.

Skip sign in

enableAnonymousAccess

Boolean (true|false)

If Support secured web apps is set to true, setting this option to true provides the ability to bypass sign in and only show publicly available web apps in the gallery.

API Key

APIKey

String

Provide an API key to grant access to the routing service for showing turn-by-turn directions in the Nearby template. Notice that an API key is created for you when you sign up for an ArcGIS Developers account. If you already have an ArcGIS account, you can sign in to an ArcGIS Developers account to view this API key and create more API keys.

Portal sort field

portalSortField

String

Used to sort web apps shown in the gallery. Possible values include: title, created, type, owner, modified, avgRating, numRatings, numComments, numViews.

Portal sort order

portalSortOrder

String

Used in conjunction with the gallery sort field to order web apps by ascending or descending. Possible values are asc or desc.