I would like to pass in a features OBJECTID as a web map URL parameter and zoom to that feature. It appears I cannot use OBJECTID on the Find Locations configuration portion of the Web Map settings page. I do not see that field in the available fields dropdown. Is it possible to allow the OBJECTID field to be searchable?
Solved! Go to Solution.
You can do this using ArcGIS Online Assistant.
"applicationProperties": {
"viewing": {
"routing": {
"enabled": true
},
"measure": {
"enabled": true
},
"basemapGallery": {
"enabled": true
},
"search": {
"enabled": true,
"disablePlaceFinder": false,
"hintText": "Place or Address",
"layers": [
{
"id": "Damage_Assessments_March_2018_8420",
"field": {
"name": "ObjectId",
"exactMatch": true,
"type": "esriFieldTypeOid"
}
}
]
}
}
}
You can do this using ArcGIS Online Assistant.
"applicationProperties": {
"viewing": {
"routing": {
"enabled": true
},
"measure": {
"enabled": true
},
"basemapGallery": {
"enabled": true
},
"search": {
"enabled": true,
"disablePlaceFinder": false,
"hintText": "Place or Address",
"layers": [
{
"id": "Damage_Assessments_March_2018_8420",
"field": {
"name": "ObjectId",
"exactMatch": true,
"type": "esriFieldTypeOid"
}
}
]
}
}
}
Thanks for the heads up and prompt reply. Then, is this the correct way to add to my URL?
/home/webmap/viewer.html?webmap=35094f1e8f6a4ef3be7791998e37008e&find=27
where '27' is a record with ObjectID=27
Thanks again,
Mark
Mark,
Yes that is correct.
Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.
Do you know if this functionality is supported in one of the original ArcGIS Online templates : "Edit Template"?
https://www.arcgis.com/home/item.html?id=48d017e94e3d4567a8b81b78352e63cd
I can't seem to get the URL parmeter to work there.
Cheers,
Mark
Hi Robert, this is great!
I wanted to ask you if it would be possible to enable it on GlobalId as well.
I am too afraid of screwing up everything. 😅
Sorry I do not know if that is possible or not.
@RobertScheitlin__GISP I followed your example and our OBJECTID field still doesn't show up in the webmap settings for layers. Our AGOL item being referenced is a secured service with many sublayers. Would we have to add some sort of sublayer number?
"applicationProperties": {
"viewing": {
"search": {
"enabled": true,
"disablePlaceFinder": true,
"hintText": "ID",
"layers": [
{
"id": "Asssets2_9498",
"field": {
"name": "OBJECTID",
"exactMatch": true,
"type": "esriFieldTypeOid"
}
}
],
"tables": []
}
}
},
@ArmstKP Even though we edited the JSON of our webmap to use the ObjectID, it didn't change what it field it says is searchable in the webmap's settings page, though it does work to search by the ObjectID. To make sure you have the correct layer ID string, I would first set another field on that layer to be searchable via the settings page and then just tweak the JSON to say ObjectID instead of that field's name and change the type to esriFieldTypeOid.