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

302
1
06-07-2020 02:27 AM
NadirHussain
Occasional Contributor II

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.

0 Kudos
1 Reply
MohammedZaki
New Contributor III

@NadirHussain  The issue with the second layer is that you are searching with non-English words

I am also facing this issue. Find the post here 

0 Kudos