Envelope env = new Envelope(); Envelope NewEnv = new Envelope(); for (int i:graphicsLayerLines.getGraphicIDs()){ Polyline p = (Polyline)graphicsLayerLines.getGraphic(i).getGeometry(); p.queryEnvelope(env); NewEnv.merge(env); } for (int i:graphicsLayerPoints.getGraphicIDs()){ Point p = (Point)graphicsLayerPoints.getGraphic(i).getGeometry(); p.queryEnvelope(env); NewEnv.merge(env); } map.setExtent(NewEnv);
Envelope env = new Envelope(); Envelope NewEnv = new Envelope(); for (int i:graphicsLayer.getGraphicIDs()){ Polygon p = (Polygon) graphicsLayer.getGraphic(i).getGeometry(); p.queryEnvelope(env); NewEnv.merge(env); } MapView.setExtent(NewEnv);
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.