Select to view content in your preferred language

Creating a custom url param for a map and passing it through url from external app

1164
3
02-04-2024 08:03 PM
Vijay101
Emerging Contributor

I just got a Trial ArcGIS public online account. I created a map with a single layer and embedded into my app.  I am also able to pass search values to the map using the the find url parameter. 

Example embed url used in my app -> href="//www.arcgis.com/apps/Embed/index.html?webmap=xxxxxxxxxxxxxxxxxxxxxxxx&.......&find=<address>"

I want to pass 2 values from my eternal app/via URL.

1. parcel id, which is an existing field in the layer (from geojson): I came across this blog, but i dont see Configure map->URL  Parameter page to create a new URL parameter and map it to a field. Is this capability not available for the ArcGIS trial public account? Or am i not looking for the URL parameter in the right place?

2. custom value which is not a layer field: Say some text/id i could pass via url into the map and which can be got from the custom popup(as {CUSTOM_URL_PARAMETER}) to display this custom value in the popup. Any suggestions on how i can do this? I couldnt find any place to define a new url parameter in the ArcGIS public trial account.

 

Tags (1)
0 Kudos
3 Replies
Vijay101
Emerging Contributor

typo: eternal app/via URL=external app/via URL

0 Kudos
JohnEvans6
Regular Contributor

Setting up the search parameter is done at the map item level, so whatever item webmap=xxxx is, go to the settings and scroll down to set the layer and field you want to use to find

https://doc.arcgis.com/en/arcgis-online/create-maps/configure-feature-search.htm

As far as I know you can't do 2 but I've been wrong more times than I've been right.

Vijay101
Emerging Contributor

Thanks for the resource. The page you had provided, if i am not mistaken, is for having additional search fields in the map UI. My issues is how to pass additional URL parameters(not related to search; not related to "find" url param" to the map  from an external app. 

Background of the problem and usecases

  1. My App : https://mydummyapp.com/property-map/home?session=2601130600044 has its own set of fields/regions and a search field 
  2. My App embeds a map and passes the search value via find url param: href="//www.arcgis.com/apps/Embed/index.html?webmap=xxxxxxxxxxxxxxxxxxxxxxxx&.......&find=<address>"
  3. usecase1: The Map needs to show, say, app username in the map poup, so i need to pass this username as a new URL parameter from the app to map
  4. usecase2: The popup which shows the parcel details for the search address string, has (,say) a "Pay" link that should take me back to my app within same session - so i want to pass the url+session id from my ap to map to popup, so that i can construct the pay link in the popup based on the app url - in this case "https://mydummyapp.com/pay/home?session=2601130600044" is the dynamic url in the popup who value is passed from "My App"

This is the reason i wanted to pass couple of addtional url parameter like "username" and "app_url" to the map, so that i can get those values in the popup.

If #2 is not available to create new custom url parameters, i can store this in existing/unused layer fields (My original Question#1), and thats where i was trying to follow this blog, but i dont see Configure map->URL  Parameter page to create a new URL parameter and map it to a field - not sure if this is only available in Pro/Paid version. I am using the public/trial version of ArcGIS online.

0 Kudos