Select to view content in your preferred language

Extent of Polygons

686
2
Jump to solution
09-23-2013 01:05 PM
GianfrancoOliva
New Contributor
Regards,

I'm doing a query where I get polygons which are then drawn on the map. I need to know how I can set Extent to which can display all the polygons obtained from the query.

thanks
0 Kudos
1 Solution

Accepted Solutions
ZachLiu1
Occasional Contributor II
you can try this. It is written in AMD mode, so make sure you add "esri/graphicsUtils" in your require function parameters, and give it a local name "GraphicsUtils".

extGraphics = GraphicsUtils.graphicsExtent(resultFeatures);             map.setExtent(extGraphics);

View solution in original post

0 Kudos
2 Replies
ZachLiu1
Occasional Contributor II
you can try this. It is written in AMD mode, so make sure you add "esri/graphicsUtils" in your require function parameters, and give it a local name "GraphicsUtils".

extGraphics = GraphicsUtils.graphicsExtent(resultFeatures);             map.setExtent(extGraphics);
0 Kudos
GianfrancoOliva
New Contributor
you can try this. It is written in AMD mode, so make sure you add "esri/graphicsUtils" in your require function parameters, and give it a local name "GraphicsUtils".

extGraphics = GraphicsUtils.graphicsExtent(resultFeatures);
            map.setExtent(extGraphics);


very grateful!:D
0 Kudos