AnsweredAssumed Answered

Get Extent from a GraphicsLayer

Question asked by jesusesricurso on Jun 19, 2012
Latest reply on Jun 20, 2012 by jesusesricurso
Hi everybody!

    I'm trying to get the extent (as a Geometry object) from a graphics layer in which i have added several polylines,  and set the map's extent with this polygon, this way:

    Polygon poligonoRutas = graphicsLayerLines.getExtent();
    if(poligonoRutas != null){
map.setExtent(poligonoRutas);
    }

    I've checked that the polygon returned has vertices, i get no error but it seems that the extent is not working. I've also tried to get the fullExtent form the graphics layer but the envelope object returned is null (i don't know the reason, because the graphics layer has several polylines). Do you know what i'm doing wrong?

Thank's in advance!

Outcomes