getFullExtentpublic Envelope getFullExtent()Returns the full extent of the layer. Returns NULL if the layer does not have a full extent.Returns:an Envelope objectSince:1.0
when i use mLayer.getFullExtent() (the mLayer is one of the mapView's layer), but it returns null, so is it possible to setFullExtent to a layer?
mLayer.setOnStatusChangedListener(new OnStatusChangedListener(){ private static final long serialVersionUID = 1L; public void onStatusChanged(Object source, STATUS status){ if (OnStatusChangedListener.STATUS.INITIALIZED == status) { mapView.setExtent(mLayer.getFullExtent()); } else if(OnStatusChangedListener.STATUS.INITIALIZATION_FAILED == status){ dialog.dismiss(); Toast toast = Toast.makeText(getApplicationContext(), "Failed to load Layer",Toast.LENGTH_SHORT); toast.setGravity(Gravity.BOTTOM, 0, 0); toast.show(); } } });
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.