In order to run the 50+ demos in this tutorial, you must perform the following tasks in the order they are listed to prepare the database, import the MVDEMO sample data set, and create the MapViewer data source named "MVDEMO".Now you should be able to run all the demos here. Note that when running them for the first time, the response may take a while to complete, as the MapViewer server has to generate all the visible base map tiles on the fly.
- Setup database metadata views *_sdo_cached_maps that are necessary for the functioning of Oracle Maps. All you need to do is run with DBA database role the following SQL script: $OC4J_HOME/j2ee/home/applications/mapviewer/web/WEB-INF/admin/mcsdefinition.sql, where $OC4J_HOME is the root directory of this OC4J instance. Note: this is a database-wide one time task. If you have performed this task previously, you are all set. To check whether your db has been configured with these views, just log into any DB user, and run the query "desc user_sdo_cached_maps". If it returns the descriptive information about the view user_sdo_cahced_maps then you are all set.
- Drop the DB user 'mvdemo', if it exists and contains only previously imported demo data for MapViewer. If you have your own data in that schema, you should back them up before dropping the user. Now recreate this 'mvdemo' db user. Or you can just create another database user for this tutorial, if you intend to keep the existing 'mvdemo' user. Now unzip the new demo dataset (mvdemo.zip) that comes with this release. Then follow the instructions in its readme file to import the data and run the mvdemo.sql script as the new user. This will setup the demo data set for the demos in this tutorial. Note: the map cache instances will also be created for you by the mvdemo.sql script.
- Create a MapViewer data source named 'mvdemo' (even if a different database user name is used in setp 2) . Click on the Admin button on the top of MapViewer's home page to log in. Then click on the 'Management' tab, choose 'Manage MapViewer', then 'Datasources'. There you can create a dynamic data source that points to the new schema you just imported the data set into. Or go to Manage MapVieewr > Configuration and add a permanent data source definition named MVDEMO there (recommended).