Select to view content in your preferred language

changing the extent

1087
2
11-04-2011 07:42 AM
TonyRopson
Emerging Contributor
hi,
I am doing a buffer query this piece of code is zooming into the feature. 
if (featholding.length > 0 && featholding.length == parnums.length - 1) {
                map.setExtent(esri.graphicsExtent(featholding[0].features),true);
         
            }

I would like to change the extent a bit so the end user can see more of the area surrounding this feature.  How would I go about changing the extent to do this?
Thanks
0 Kudos
2 Replies
HemingZhu
Frequent Contributor
hi,
I am doing a buffer query this piece of code is zooming into the feature. 
if (featholding.length > 0 && featholding.length == parnums.length - 1) {
                map.setExtent(esri.graphicsExtent(featholding[0].features),true);
         
            }

I would like to change the extent a bit so the end user can see more of the area surrounding this feature.  How would I go about changing the extent to do this?
Thanks


map.setExtent(esri.graphicsExtent(featholding[0].features).expand(1.2),true);
0 Kudos
TonyRopson
Emerging Contributor
nice just what I needed thanks
0 Kudos