@Override public void mapExtentChanged(MapEvent event) { if (event.getID() == MapEvent.MAPEVENT_PAN_ENDED) { System.out.println("MAPEVENT_PAN_ENDED: " + event.getID()); } else if (event.getID() == MapEvent.MAPEVENT_FIRST) { System.out.println("MAPEVENT_FIRST: " + event.getID()); } else if (event.getID() == MapEvent.MAPEVENT_PAN_ENDED) { System.out.println("MAPEVENT_PAN_ENDED: " + event.getID()); } else if (event.getID() == MapEvent.MAPEXTENT_LAST) { System.out.println("MAPEXTENT_LAST: " + event.getID()); } else if (event.getID() == MapEvent.MAPEVENT_ZOOM_COMPLETED) { System.out.println("MAPEVENT_ZOOM_COMPLETED: " + event.getID()); } else if (event.getID() == MapEvent.MAPEVENT_EXTENT_CHANGED) { System.out.println("MAPEVENT_EXTENT_CHANGED: " + event.getID()); } }
Only MAPEVENT_READY, MAPEVENT_EXTENT_CHANGED and MAPEVENT_DISPOSE are used. The other values are no longer used. These three correspond to the MapEventListener interface mapReady, mapExtentChanged and mapDispose. Since you handle specific events through this interface the event IDs are not of much use e.g. if you handle mapExtentChanged then it would have the ID of MAPEVENT_EXTENT_CHANGED.Hopefully the unused IDs can be removed in the next release.
I believe that map ready and map extent changed are the only events that are used.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.