Is This Content Helpful?
We're glad to know this article was helpful.
What major changes are required to upgrade MapObjects-Java 1.x applications to MapObjects-Java 2.x?
Applications developed with MapObjects—Java 1.x will require some changes to correctly function with MapObjects—Java 2.x JAR files.
The most important step is to change the package names in applications from "mo" to "mo2". The 'RenameMo' utility included under the MOJ20/Utilities folder is provided exactly for this purpose. Reference the "ReadMe.txt" file in the aforementioned directory for instructions on use.
Other major changes are as follows:
· SearchableLayer—This interface has been removed. The com.esri.mo2.map.dpy FeatureLayer should now implement the searchable interface of the com.esri.mo2.data.feat package instead to directly search data.
· BaseToolBar—The getSelectedLayer method has been removed and replaced with a getSelectedLayers method. This method returns an array of com.esri.mo2.dpy.Layer objects instead of a single layer.
· A change related to the fields in com.esri.mo2.ui.tb.ZoomPanToolBar and com.esri.mo2.ui.tb.SelectionToolBar has been introduced at 2.0. At version 1.x, one could directly refer to the individual tools as fields of these classes to customize the toolbars. Now the classes com.esri.mo2.ui.tb.ZoomPanToolBarActions and com.esri.mo2.ui.tb.SelectionToolBarActions exist for this purpose. Refer to the JavaDoc for more details.
· The structure of the various icons has been slightly changed. Custom tools using the icons from com.esri.mo2.util.Resource may not work using 1.x references. A new utility has been included in the MOJ20/Utilities/IconViewer folder to show the package structure of the icons and usage instructions. Refer to this folder for further details.
LayerSource deprecations and the new Content API
· Several classes were deprecated in relation to the old LayerSource API.