URL parameters no longer work with new map viewer

439
5
Jump to solution
01-24-2022 12:49 PM
Labels (2)
ahargreaves_FW
Occasional Contributor III

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
5 Replies
LearnThenShare
New Contributor III

That is beyond frustrating!!  I don't know who is the lead is on the "New" (not necessarily improved) Map Viewer.  Little to no accountability!  As soon as they decided to call the New Map Viewer "Map Viewer" and the original Map Viewer "Map Viewer Classic" I knew were were in for a continued rough ride with these Esri developers.  Anyway, I do love most of Esri suite.  It just drives me crazy how they pull such BS and bad decisions when they should just keep building on what works.  I have not and will not move to the New Map Viewer.  It should not be out of BETA yet.

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
Occasional Contributor III

@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
Occasional Contributor III

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.