I select features on feature layers as per the following example in my application.
Select with Feature Layer | ArcGIS API for JavaScript
Once the features are selected, I use following code to set an extent of the map.
gisMap.setExtent(graphicsUtils.graphicsExtent(selectedFeatures));
The problem is - when the features are highlighted using symbol/text, they slightly cut-off on the screen (see Capture1.jpg attached). If I zoom-in then it appears properly (see Capture2.jpg attached). How can I fix this issue so, selected features with symbols appear properly on the screen without cut-off? I wonder if I need to manipulate the extent manually by some value e.g. xmin-1000, ymin-100 etc. Not sure if this is correct approach to do. Any suggestions?
If your map contains a tiled layer, there's an optional parameter you can use in setExtent to make sure the new extent is fully contained in the map view.
gisMap.setExtent(graphicsUtils.graphicsExtent(selectedFeatures), true);
No, I am not using tile layer. I am using ArcGISDynamicMapServiceLayer. Is there any way to achieve it using dynamic layer?