public void onChanged ( ChangedEvent event ) { String value = ( String ) scaleItem . getValue ( ) ; Double scale = valueToScale . get ( value ) ; if ( scale != null && ! Double . isNaN ( pixelLength ) && 0.0 != pixelLength ) { mapView . setCurrentScale ( scale / pixelLength , MapView . ZoomOption . LEVEL_CLOSEST ) ; } }
When the user selects a different scale have the map zoom to it .