@Export
	public MapController createMapController(Map map, String id) {
		MapWidget mapWidget = ((MapImpl) map).getMapWidget();
		if ("PanMode".equalsIgnoreCase(id)) {
			return createMapController(map, new PanController(mapWidget), id);
		} else if (ToolId.TOOL_MEASURE_DISTANCE_MODE.equalsIgnoreCase(id)) {
			return createMapController(map, new MeasureDistanceController(mapWidget), id);
		} else if (ToolId.TOOL_FEATURE_INFO.equalsIgnoreCase(id)) {
			return createMapController(map, new FeatureInfoController(mapWidget, 3), id);
		} else if (ToolId.TOOL_SELECTION_MODE.equalsIgnoreCase(id)) {
			return createMapController(map, new SelectionController(mapWidget, 500, 0.5f, false, 3), id);
		} else if ("SingleSelectionMode".equalsIgnoreCase(id)) {
			return createMapController(map, new SingleSelectionController(mapWidget, false, 3), id);
		} else if (ToolId.TOOL_EDIT.equalsIgnoreCase(id)) {
			return createMapController(map, new ParentEditController(mapWidget), id);
		}
		return null;
	}
@ Export public MapController createMapController ( Map map , String id ) { MapWidget mapWidget = ( ( MapImpl ) map ) . getMapWidget ( ) ; if ( "PanMode" . equalsIgnoreCase ( id ) ) { return createMapController ( map , new PanController ( mapWidget ) , id ) ; } else if ( ToolId . TOOL_MEASURE_DISTANCE_MODE . equalsIgnoreCase ( id ) ) { return createMapController ( map , new MeasureDistanceController ( mapWidget ) , id ) ; } else if ( ToolId . TOOL_FEATURE_INFO . equalsIgnoreCase ( id ) ) { return createMapController ( map , new FeatureInfoController ( mapWidget , 3 ) , id ) ; } else if ( ToolId . TOOL_SELECTION_MODE . equalsIgnoreCase ( id ) ) { return createMapController ( map , new SelectionController ( mapWidget , 500 , 0.5f , false , 3 ) , id ) ; } else if ( "SingleSelectionMode" . equalsIgnoreCase ( id ) ) { return createMapController ( map , new SingleSelectionController ( mapWidget , false , 3 ) , id ) ; } else if ( ToolId . TOOL_EDIT . equalsIgnoreCase ( id ) ) { return createMapController ( map , new ParentEditController ( mapWidget ) , id ) ; } return null ; }
Create a known controller for the map. Different implementations may 'know' different controllers, so it's best
to check with the implementing class.

@param map
The onto which the controller should be applied.
@param id
The unique ID for the map controller (implementation specific).
@return The map controller, or null if it could not be found.