Select to view content in your preferred language

URL parameters no longer work with new map viewer

2606
6
Jump to solution
01-24-2022 12:49 PM
Labels (2)
ahargreaves_FW
Frequent Contributor

Hello,

I'm trying to use a URL parameter to search out a uniqueID and highlight the feature in a webmap with a URL parameter that use dot work for a webmap build in "classic".

The uniqueID is created as a string using #Survey123.

The webmap has the uniqueID field included in its searchable layers.

However, the url parameter shown below now no longer works since migrating the map to the new map viewer:

https://xxxxxx.maps.arcgis.com/home/webmap/viewer.html?webmap=cxxxxxxxxx9?find=0xxxxxx5

ahargreaves_FW_0-1643057246309.png

 

1 Solution

Accepted Solutions
RussRoberts
Esri Notable Contributor
0 Kudos
6 Replies
JohnCoddHere
Regular Contributor

That is frustrating!

John Codd (Here)
JeremyNickel
New Contributor

At this point, it feels less like progress and more like forced compliance through broken backward compatibility. Esri used to be a tool that made my job easier—now it’s a constant cycle of chasing bugs and rebuilding work that already functioned. That’s not innovation; that’s inefficiency.

0 Kudos
SzuNyiapTang
Esri Contributor

Hi @ahargreaves_FW 

According to the documentation, it should work for both Map Viewer. 

for the new Map viewer https://xxxx.maps.arcgis.com/apps/mapviewer/index.html?webmap=xxxxx&find=xxxx

View this example in Map Viewer

Cheers,

Tang

Cheers,
Tang
0 Kudos
ahargreaves_FW
Frequent Contributor

@SzuNyiapTang but it doesn't work - hence why I posted.

The example you link to is searching for an address searched against the esri geocoding service. My example looks to search an attribute in a layer included n the webmaps search settings. If I've done something wrong, or misread the documentation, please let me know.

0 Kudos
RussRoberts
Esri Notable Contributor
0 Kudos
ahargreaves_FW
Frequent Contributor

hmmm...OK, thanks @RussRoberts  for sending me down the right path. So this was interesting. Here's my theory:

  1. Before posting this thread I had manually edited my webmaps JSON to include ObjectID and GlobalID as search parameters in an attempt to use those:

"search": {
"disablePlaceFinder": false,
"enabled": true,
"hintText": "Place or Address",
"layers": [
{"field": {
"exactMatch": true,
"name": "objectid",
"type": "esriFieldTypeOID"
},
"id": "xxxxxxxxx"
},
{
"field": {
"exactMatch": true,
"name": "globalid",
"type": "esriFieldTypeGlobalID"
},
"id": "xxxxxxxx"
}

2. Once they failed to work I established a UniqueID calc’d through Survey123.

3. I updated the webmap to use that in it’s search criteria instead. But it never did. Hence this post.

4. Upon checking the JSON for the webmap it appears that, perhaps by previously manually editing it,  step #3 above never took. And the webmap never actually had my UniqueID set as a search criteria in it’s JSON, despite showing me it did through AGOL GUI.

5. I manually removed ObjectID and GlobalID from the JSON, and manually added in UniqueID….voila! it works.