Search widget result graphics don't display with vector basemap?

1120
5
04-05-2017 09:55 AM
IsaiahAguilera
Occasional Contributor II

I have come across an issue when using the search widget with a vector base map. For some reason when zooming to the result in my case a polygon the highlight graphic doesn't show up. This is even the case in the search multiple sources example in the 3.x api samples. Open the sample in sandbox then switch base map to "topo-vector" then search using any source that isn't the geocoder and the result graphic doesn't display. Is this a known issue? Just to clarify I am using the 3.x api at the moment.

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus

Isaiah,

   When I do as you say use the search multiple source sample and change the basemap to a vector basemap and search for a city it adds the point marker symbol just fine.

If you notice the congress and senator feature services do not return geometry:

Has Geometry Properties: false

Edit: Actually I took that sample and added my own polygon layer to the search source and it worked fine too.

0 Kudos
IsaiahAguilera
Occasional Contributor II

I do see what you are saying. I actually noticed the Has Geometry Properties: false also. Ill be a little more specific about how I reproduced it. If you change the source to the congressional districts layer rather than searching using all then you get no highlight graphic. However if you do this above steps while using the regular (non-vector) base map then you do get a highlight graphic. The point marker comes up if you are searching all sources because of the world geocoder but all my uses don't include this. So selecting the source congressional districts specifically removes the geocoder and then reproduces my issue. Another way of reproducing my issue in the sample is to set the sources to a blank array first. 

var sources = [];‍‍

edit: here are photos with the results for vector and non vector base maps

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Isaiah,

   Ahh, I see it now. There are no errors generated in the console so this seems like a bug that needs to be reported to esri tech support. I can see the request for the geometry is made and returned but not being added to the map when using vector basemap.

IsaiahAguilera
Occasional Contributor II

Yeah it seems like this is a bug. The work around I am using at the moment is manually adding the graphic to the maps graphic layer using the 'select-result' event. I just have to grab the symbology from the layers render before I add it. Not a big deal but definitely a bug. Ill get in contact with Esri to report the bug. Thanks for the help Robert! 

0 Kudos
UndralBatsukh
Esri Regular Contributor

iaguilera14‌ thank you for reporting this issue. This issue should be fixed in the next release. 

0 Kudos