AnsweredAssumed Answered

Using Feature Search in Embed Map URL

Question asked by meperko on Feb 2, 2016
Latest reply on Feb 2, 2016 by meperko

Hi.  I would like to configure my web map to support "feature=layerID;searchfield;searchvalue" parameter of the apps/Embed URL.  It seems to be pretty straightforward until I want to search two layers within the same map service.


So, I set up a “By Layer” find location capability for each layer in the web map and it looks like this under the hood:


"search":{"enabled":true,"disablePlaceFinder":false,"hintText":"Place, Address, TIP#","layers":[{"id":"NCDOT_STIP_1732","field":{"name":"TIP","exactMatch":false,"type":"esriFieldTypeString"},"subLayer":0},{"id":"NCDOT_STIP_1732","field":{"name":"TIP","exactMatch":false,"type":"esriFieldTypeString"}


I think because the web map references the map service, the map service id is duplicated as the search layer id instead of creating unique ids.  As a result, the URL does not find the feature in either layer.  For example:;TIP;B-5339


From what I can tell, in order to make this search work, I have to add the map service layers to the web map separately.  However, the power of referencing a map service in a web map is that all layers are grouped together.  I lose that if I add the layers separately (until AGOL supports service/layer grouping in the web map).


So, I’m wondering if anyone knows how to make the feature= capability work without referencing each layer separately in the web map.


I hope this makes sense.  Thanks.