Select to view content in your preferred language

Can I search for Graphics added to map?

355
1
01-04-2019 02:35 AM
LarsFagerbakke
Occasional Contributor

I've added some map locations by creating a Graphic and added it to the map. They all have attributes like Title and Description.

var pointGraphic = new Graphic({
 geometry: point,
 symbol: markerSymbol,
 attributes: {
 Title: currentObj.title,
 Description: currentObj.description
 },
 popupTemplate: graphicPopUpTemplate
});

view.graphics.add(pointGraphic);

Is it possible to add it as a search source?
Tags (1)
0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

Lars,

   Unfortunately the answer is No. The Search widget can have FeatureLayerSearchSources and LocatorSearchSources. But the FeatureLayerSearchSource has this note:

Feature layers created from client-side graphics are not supported.
0 Kudos