AnsweredAssumed Answered

how to get all results from all sources in Search widget Scene view

Question asked by Nadir_Hussain on Jun 7, 2020

Dear All,

i am using arcgis 4.15. i have a search widget.i want to get all results from all my sources which i place in sources.

 

var searchWidget = new Search({
view: view,
allPlaceholder: "Enter key word",
includeDefaultSources: false,
locationEnabled: false,
searchAllEnabled:true,
sources: [
{
//layer: featureLayerBoundry,
layer: new FeatureLayer({url: "",
outFields: ["*"],
popupTemplate: {
title: "Region: {Aname} </br>"+
"Region English Name: {Ename}<br>"+
"Capital Arabic Name:{Capital_A}",
overwriteActions: true
}
}),
searchFields: ["Ename"],
displayField: "Ename",
exactMatch: false,
outFields: ["Aname", "Ename", "Capital_A","Capital_E "],
name: "Boundry",
placeholder: "Boundry Layer"
},
{
//layer: featureLayerMoadBina,
layer: new FeatureLayer({url: "",
outFields: ["*"],
popupTemplate: {
title: "اسم الشركة"+":"+"{اسم_الشركة}"+"</br>"+
"الامارة"+":"+"{الامارة}"+"</br>"+
"رقم القرار"+":"+"{رقم_القرار}" ,
overwriteActions: true
}
}),
searchFields: ["اسم_الشركة ", "رقم_القرار"],
//suggestionTemplate: "{اسم_الشركة}, رقم_القرار: {رقم_القرار}",
exactMatch: false,
outFields: ["*"],
placeholder: "example: Casey",
name: "MoadBina",
zoomScale: 500000,
maxResults: 20,
maxSuggestions: 6,
suggestionsEnabled: true,
minSuggestCharacters: 0,
resultSymbol: {
type: "picture-marker", // autocasts as new PictureMarkerSymbol()
url:
"https://developers.arcgis.com/javascript/latest/sample-code/widgets-search-multiplesource/live/images/senate.png",
height: 36
}
}
]
});

both layers are closed shapes.when i search something it give me only one result from second layer.there is no exact match.so it should return more than one result.but it return only one result.

Please help.

 

Thanks in advance.

Outcomes