MapViewer FAQ

Last Modified: 11/2004

Note: questions marked with have been updated or are new for version 10.1.2.


Introduction

1.                What is MapViewer?

2.                What is the easiest way to get started with MapViewer?

3.                How is MapViewer licensed?

4.                What are the prerequisites for using MapViewer?

5.                Why is the Map Definition Tool (MDT) not part of the official release?

Installation

1.                Where can I find MapViewer and the Map Definition Tool?

2.                What's the minimum required JDK version?

3.                I downloaded MapViewer from OTN some time ago. How do I find out which version it is?

4.                How do I specify the admin user/password for MapViewer after deploying it to Oracle Application Server?

5.                What's the MapViewer home page?

6.                How do I log in as a MapViewer administrator?

7.                Why can't I login to perform administrative tasks on linux?

8.                How do I run MapViewer on a Unix/Linux server that does not have an X11 Display?

9.                Is there any difference between the mapviewer.ear file that comes with Oracle Application Server, and the one downloadable from OTN?

10.             Is it possible to deploy MapViewer on a 3rd party application server such as JBoss?

Using MapViewer

1.                MapViewer is set up. Just for fun, how do I show a point (x,y)?

2.                I have a table with a geometry column. Now how do I view the spatial data using MapViewer?

3.                Can MapViewer display 3D data?

4.                Can MapViewer view 3rd party spatial/GIS data?

5.                Can I define a permanent data source for MapViewer?

6.                Can I use the Container's data source as a MapViewer data source?

7.                Can MapViewer display spatial data in different projections?

8.                Can MapViewer display geometries in function-based indexes?

9.                Can I save a complex query in its entirety for a dynamic (JDBC) theme?

10.             How do I view large coverage data using a global projection?

11.             When migrating the database used by MapViewer, what are the ways to move all the styles, themes, and map definitions in the schema?

12.             How do I create an SVG map with info-tips following mouse movement?

13.             Why don't the zoom/pan tools work with my SVG maps?

14.             Is MapViewer compatible with OpenGeospatial Consortium (OGC)'s WMS specification?

15.             Can MapViewer display map layers generated from another WMS instance?

16.             Can MapViewer display a theme based on a view?

17.             How do I place a text label at a specific point on the map, without drawing the point itself?

Development

1.                Can MapViewer generate HTML image maps automatically?

2.                Can I access MapViewer functions from a C|C++|Perl|PL/SQL program?

3.                How can I add the MapViewer JSP tags to Oracle JDeveloper's Component Palette?

4.                How do I view mapping metadata through JDeveloper's Connections Navigator?

5.                I have just changed the definitions of some (styles/themes/basemaps). Why are my maps still using the old definitions?

6.                How do I disable certain themes from being cached?

7.                How do I create a map with pie charts?

8.                How do I dynamically add a style from my application?

9.                How do I ensure that certain features ALWAYS get labeled on the map?

10.             How do I use an Advanced Style in a JDBC theme?

11.             How do I dynamically generate a map legend in its own image?

12.             Can I use MapViewer with Oracle UIX pages?

13.             What are the values of the "matrix" attribute in an xml map response's <xfm> element?

14.             Can MapViewer generate maps with a transparent background?

15.             Can MapViewer display versioned spatial data in a workspace?

16.             How do I display spatial data stored in another schema?

17.             How do I bound a map based on the MBR of a theme or dynamic query's results?

Performance and Administration

1.                How can I improve the overall performance of MapViewer?

2.                How do I control the number of database sessions used by MapViewer?

3.                How do I define a data source that connects to an Oracle RAC (Real Application Cluster) database?

Known Issues in version 9.0.4

1.                Using dynamic styles across two MapViewer server instances

2.                View-based themes with identical key_column values


Introduction

1.  What is MapViewer?

MapViewer is a rendering service for geospatial data managed in Oracle Spatial. It is a component of the Oracle Application Server, and first shipped with the 9.0.2 version of 9iAS. MapViewer is a pure Java component written for the Oracle Container for J2EE (OC4J), although it can also be deployed to other J2EE containers such as JBoss.

2.  What is the easiest way to get started with MapViewer?

Downloading the Quick Start kit of MapViewer 10.1.2 is the easiest way to get started. This kit includes a standalone OC4J (Oracle Container for J2EE) pre-configured with the latest version of MapViewer and ready for action. The kit is available from from MapViewer's OTN page at http://otn.oracle.com/products/mapviewer, under the Software section. This kit plus a Java SDK 1.4 or later installation is all you need to get going.

Once you have installed the Quick Start kit, you should download the demo data set for 10.1.2, and load the data into your Oracle Spatial database. After loading the data, go to the MapViewer's admin page and define a new data source named "mvdemo". This will tell MapViewer where you have loaded the demo data set. Now go to MapViewer's home page and try the cool demos listed there.

3.  How is MapViewer licensed?

Starting with Oracle Application Server 10.1.2, MapViewer is part of the Oracle AS Java Edition, Standard Edition, and the Enterprise Edition. It is also included as part of your JDeveloper license for development purposes.

4.  What are the prerequistes for using MapViewer?

Oracle database version 8i (8.1.6) or later, as well as Oracle Application Server 9i (9.0.2) or later. It's also possible to simply install a standalone version of Oracle Container for J2EE (OC4J) and deploy MapViewer to it.

For MapViewer version 10.1.2, you will need Java 2 SDK 1.4 or later.

5.  Why is the Map Definition Tool (MDT) not part of the official release?

MDT is undergoing an extensive rewrite so that it can fully support all the functionalitity currently available in the MapViewer server. Since this is not completed yet, we are temporarily providing the first beta version of MDT (the one you currently are using) for download from OTN. This MDT lacked sufficient functionality and full support of MapViewer, and hence is not part of our official MapViewer release.


Installation

1.  Where can I find MapViewer and the Map Definition Tool?

Officially, MapViewer is shipped as part of the Oracle Application Server Java, Standard and Enterprise editiions. For development purposes, you may download the MapViewer kit from Oracle Technet (www.oracle.com/technology). It is listed under the Oracle Spatial section (www.oracle.com/technology/products/spatial/content.html).

The Map Definition Tool is an unsupported tool that can be used to visually create database-backed definitions of map styles, themes and basemaps. It can be downloaded from the same page where the MapViewer kit is located.

2.  What's the minimum required JDK version?

JDK 1.4 is the minimum version required. MapViewer will not work with JDK 1.3 or any earlier version. Also note that if you are using a standalone OC4J instance, you must start it using the Java executable that is under your JDK installation's top bin directory. The java executable under the jre/bin directory will NOT work with OC4J.

3.  I downloaded MapViewer from OTN some time ago. How do I find out which version it is?

First, scroll all the way to the bottom of the home/welcome page of your MapViewer instance. If you see a line like Build: Ver9_0_4_B030829, that's the version and build number of your MapViewer instance.
If you did not see such a line, chances are it is an older (pre 9.0.4) version of MapViewer. In any case, you can always navigate to the MapViewer's unpacked directory $MAPVIEWER/web/WEB-INF/lib/, and find the file named mvclient.jar. Now run the command "jar tvf mvclient.jar" and it will display a list of class files packaged inside. One of the files will have a name like "Ver902_*.class". This tells you the version and build number of your MapViewer instance.

4.  How do I specify the admin user/password for MapViewer after deploying it to the Oracle Application Server?

Note 1: This question is only applicable to MapViewer production version 9.0.4 or later.
Note 2: If you deployed MapViewer to a standalone OC4J, you do not need to do anything during deployment. For instructions on how to log in, check here.

After you deployed MapViewer, you will need to create an admin user for MapViewer in its OC4J container instance. This admin user then needs to be mapped to the MapViewer's "map_admin_role" security role. The following screenshots show an example of performing this task.

Step 1. First, go to the Oracle AS Enterprise Manager website, navigate to the OC4J instance running MapViewer, and select the "mapviewer" application. Now click on its "Security" link.

Step 2. Note that there are no existing security users or groups. So we will need to add a user for MapViewer.

Step 3. Provide the name and password for the new security user. Be sure to remember this password.

Step 4. Having created a new security user we must map it to MapViewer's built-in security role "map_admin_role".

Step 5. By choosing the newly created user to be mapped to the "map_admin_role".

Now if we go to the MapViewer's site, and try to perform certain restricted operations such as "add a datasource", we will be prompted for a user name and password. Use the newly created security user/password.

5.  What's the MapViewer Home Page?

Throughout this FAQ, you will come across references to the MapViewer home page. This is the default page that you will see when you point your browser to the URL of the form http://host:port/mapviewer, where the host should be the name or IP address of the host running MapViewer, and port is the port number at which the Oracle Application Server is listening for web requests. It may also be the port on which OC4J is listening, if you only installed a standalone version of OC4J. With a full Oracle Application Server install, the port is usually 7779 or 7777. With a typical standalone OC4J install, the port is usually 8888.

The MapViewer home page serves many purposes. It provides many HTML forms for administrative purposes, and for submitting xml Map Requests. It also links to several on-line demos that you can experiment with.

It is usually a good idea, for security, to hide this home page from external users or applications when deploying MapViewer.

6.  How do I log in as a MapViewer administrator?

Beginning with MapViewer production version 9.0.4, certain administrative operations such as adding or removing a datasource will require you to log in as an administrator. The admin user name and password depends on whether you deployed MapViewer in a standalone OC4J or a full Oracle Application Server install.

o        If MapViewer is deployed in a standalone OC4J: The user name will be "admin", the password is the admin password you specified when you installed the OC4J instance (at the prompt after you type in "java -jar oc4j.jar -install"). If you have forgotten the password, you can cd into OC4J's j2ee/home direcotry and type "java -jar oc4j.jar -install" again which will prompt for the new admin password.

o        If MapViewer is deployed in a full Oracle Application Server: You should have created an admin user in the OC4J instance where MapViewer is running. This is done as specified in this answer to a previous question.

 

7.  Why can't I login to perform administrative tasks on linux?

On Redhat Linux Enterprise version, there may be a login issue when running MapViewer with a standalone installation of OC4J (9.0.4). It occurs because the admin password that you specified when first installing OC4J was not recorded and thus not effective. So when you attempt to use that password to login to MapViewer's admin page it fails (the login dialog simply reappears even after you entered the "correct" password). The solution is to set the OC4J admin password again by issuing "java -jar oc4j.jar -install" for a second time from the OC4J home directory.

8.  How do I run MapViewer on a Unix/Linux server that does not have an X11 Display?

On Linux or Unix systems, if you have installed Java JDK 1.4, then you can take advantage of its -Djava.awt.headless=true option to start OC4J without an X11 server running or the DISPLAY environment variable set. Here is an example of how to start up a standalone version of OC4J which contains MapViewer:

        sh> java -Djava.awt.headless=true -jar oc4j.jar       
    

9.  Is there any difference between the mapviewer.ear file that comes with Oracle Application Server, and the one downloadable from OTN?

In terms of functionality, there is no difference. However, the packaging is different. The mapviewer.ear file that comes with a full installation of Oracle Application Server (located under the $ORACLE_HOME/lbs directory) is smaller than the one you download from OTN. The difference is sdovis.jar, which is not packaged inside the former, but is included with the latter.

As such, if you are deploying the native mapviewer.ear to the Oracle Application Server, you must explicitly add the sdovis.jar file (located under $ORACLE_HOME/lbs/lib) to its library path.

On the other hand, if you are deploying a mapviewer.ear file that is downloaded from OTN (either a production version or a preview version), you should skip the step that adds the sdovis.jar file.

sdovis.jar is the core rendering engine of MapViewer.

10.  Is it possible to deploy MapViewer on a 3rd party application server such as JBoss?

This is not supported or recommended. However users have successfully deployed the mapviewer.ear file downloaded from OTN into a 3rd party J2EE compliant container, such as JBoss. You will need the Oracle JDBC driver (classes12.jar or ojdbc14.jar) and Oracle XML parser (xmlparserv2.jar) in the J2EE container's library path. The latest versions of both should work.

Note that for WebLogic, it appears that you must manually unpack the mapviewer.ear file and then deploy from the unpacked directory. If you deploy from the mapviewer.ear to WebLogic MapViewer will not initialize properly.


Using MapViewer

1.  MapViewer is set up. Just for fun, how can I show a point located at (-100.5, 40.5)?

There are at least two ways to show a point. The following options all assuming you have defined a datasource named "mvdemo".

Option 1: Specifying the point to be the center of a map request. Here is such a sample (just note that the size attribute of the center element has no effect in this request):

      <?xml version="1.0" standalone="yes"?>
      <map_request  datasource="mvdemo"    format="GIF_STREAM">
        <center size="1">
           <geoFeature render_style="default">
               <geometricProperty typeName="center">
                   <Point>
                       <coordinates>-100.5, 40.5</coordinates>
                   </Point>
               </geometricProperty>
           </geoFeature>
        </center>

      </map_request>
   
   

What you will get is a "map" like this:

Option 2: Using a map request, but specify the point through a dynamic theme using a SQL query. The SQL query itself basically constructs a temporary Point geometry and returns it. Here is the sample map request:

        <?xml version="1.0" standalone="yes"?>
        <map_request datasource="mvdemo"  format="GIF_STREAM">
          <themes>
            <theme name="a point" >
               <jdbc_query  datasource="mvdemo">
                    SELECT mdsys.sdo_geometry(2001, null,
                                              mdsys.sdo_point_type(-100.5, 40.5, null),
                                              null, null)
                    FROM dual
               </jdbc_query>
             </theme>
          </themes>
        </map_request>
   
 

2.  I have a table with a geometry column. Now how do I view the spatial data using MapViewer?

Go to the MapViewer home page, click on the demos link, then choose the jview.jsp demo. This is a simple utility that you can use to quickly view any spatial data stored in the database or created through Oracle Spatial's functions (such as the result of an sdo_buffer operation).

In the jview.jsp page, fill in a datasource name that you already defined, and then simply type a SQL query that will select the table's geometries in the text area named "query 1". Note: you should not end your query with ';'.

Click on the Submit button, and a map showing the geometries you just selected will appear.

The following screen shot shows a more sophisticated example of using jview.jsp, showing 3 queries involving two spatial tables: counties and cities. The first query simply selects all the geometries from the counties table where the state abbreviation is 'AL'. The Second query selects all the major cities from the cities table where the state abbreviation is also 'AL'. Note how you can also specify a label column as in the second query. The third query creates a buffer around each city, using Oracle Spatial's sdo_buffer function.

3.  Can MapViewer display 3D data?

No, not yet.

4.  Can MapViewer view 3rd party spatial/GIS data?

No, but it can use map images from a Webmap Server. MapViewer 10.1.2 supports a new theme type called WMS-Theme, which can be used to import a map layer generated by any 3rd party's OGC WMS 1.1 compliant server.

Here is a sample XML map request for MapViewer that includes a WMS theme. Note you can also add WMS themes through the Java API. Note the parameters specified in the WMS theme are for illustration only.

 
<?xml version="1.0" standalone="yes"?>
<map_request
  title="wms theme"  datasource="mvdemo"
  width="675"  height="337"
  bgcolor="#0000ff"  antialiase="true"
  format="PNG_STREAM"
>
  <center size="7.0">
    <geoFeature>
      <geometricProperty typeName="center">
        <Point>
          <coordinates>-120.0,38.0</coordinates>
        </Point>
      </geometricProperty>
    </geoFeature>
  </center>
  <themes>
    <theme name="THEME_DEMO_HIGHWAYS" />
    <theme name="THEME_DEMO_CITIES" />
    
    <theme name="wmstheme1" timeout="20000"  >
       <wms_getmap_request  isBackgroundImage="true" >
           <service_url>
                 http://gisdata.my_corp.net/servlet/com.esri.wms.Esrimap
           </service_url>
           <version>1.1.0</version>
           <format>image/png</format>
           <srs>EPSG:4326</srs>
           <bgcolor>0xa6cae0</bgcolor>
           <transparent>false</transparent>
           <exceptions>application/vnd.ogc.se_inimage</exceptions>
           <layers>
                 GTOPO60+Color+Shaded+Relief
           </layers>
           <vendor_specific_parameters>
                <vsp>
                    <name>ServiceName</name>
                    <value>WMS_GTOPO</value>
                </vsp>
           </vendor_specific_parameters>
       </wms_getmap_request>
    </theme>
    
  </themes>
</map_request>
 
    

Note that in the above map request, in addition to the two vector themes, we are also requesting a theme named "wmstheme1" to be plotted in the result map. MapViewer will issue a WMS GetMap request based on the specified parameters, and the current viewing window, to the WMS server named in the theme. The returned image from the external server is plotted as a background image in this case, but it can also be plotted in the same order as in the theme list. The timeout value specifies how many milliseconds MapViewer will wait for the external server to respond. The timeout parameter currently only applies to a WMS theme and not to predefined or JDBC themes.

5.  Can I define a permanent data source for MapViewer?

Yes. Simply add your data source definition in the mapViewerConfig.xml. Make sure you prefix your database user's password with "!", so that MapViewer will obfuscate the cleartext password when it reads in the data source definition for the first time. Here is an example datasource definition placed in mapViewerConfig.xml.

        <map_data_source name="mvdemo"
                         jdbc_host="mapsrus.my_corp.com"
                         jdbc_sid="orcl"
                         jdbc_port="1521"
                         jdbc_user="scott"
                         jdbc_password="!tiger"
                         jdbc_mode="thin"
                         number_of_mappers="3"
         />     
     

6.  Can I use the Container's data source as a MapViewer data source?

Yes. When defining a new data source, you can use the container_ds attribute instead of specifying detailed connection information through jdbc_host/jdbc_sid/jdbc_port/jdbc_user/jdbc_password/jdbc_mode. The value for the container_ds attribute should be the same as that of the ejb-location in your container's data source definition.

Here is one example of map data source definition that is reusing a container data source:

 
    <map_data_source   name="mvdemo"
                       container_ds="jdbc/OracleDS"
                        number_of_mappers="3"
    />
    

Note that if you want to use container_ds in a permanent data source stored in mapViewerConfig.xml file, you must start your OC4J instance with the -userThreads option (java –jar oc4j.jar –userThreads), which instructs OC4J to make its datasource names known to user thread context. You can however always use the container_ds attribute if you are adding or redefining a data source through MapViewer's Admin Page, even if OC4J is started without the -userThreads option.

7.  Can MapViewer display spatial data in different projections?

Yes.

Prior to version 10.1.2, all the spatial data rendered by MapViewer had to be in the same spatial reference system (SRS). If your data comes from different sources and they use different SRS's, you had to explicitly use Oracle Spatial's coordinate system functions to transform them into a single reference system for viewing purposes.

Starting with 10.1.2, MapViewer can now perform on-the-fly projection of your spatial data. To enable this, you must specify a master srid in your map request. If a theme being requested has a different srid for its data, MapViewer will invoke Spatial's coordinate transformation functions to transform that theme's data into the master srid. The transformation is done in the database server as part of the query. The result is sent to MapViewer for rendering. The original data in the database will not be modified.

8.  Can MapViewer display geometries in function-based indexes?

Yes. For instance, you can query geometries with a function-based index and display them by defining a dynamic JDBC theme.

9.  Can I save a complex query in its entirety for a dynamic (JDBC) theme?

Yes, you can specify a complete SQL query instead of simple sql condition in a predefined theme's styling rule. For instance, the following is the definition of a theme's styling rule where the complete query for selecting the geometries of this dynamic theme is specified.

      <?xml version="1.0" standalone="yes"?>
       <styling_rules>
         <rule>
           <features style="L.POOR_ROADS" asis="true">
              select sdo_lrs.clip_geom_segment(geometry,start_measure,end_measure)
                    geometry
              from (select /*+ no_merge use_hash(a b) */
                      a.street_id, name, start_measure, end_measure, geometry
                   from (select /*+ no_merge */ a.street_id, name, geometry
                         from philly_roads a
                         where sdo_filter(geometry,mdsys.sdo_geometry(2002,41124,null,
                          mdsys.sdo_elem_info_array(1,2,1),
                                             mdsys.sdo_ordinate_array(?,?,?,?)),
                                       'querytype=window')='TRUE') a,
                         philly_road_conditions b
                   where condition='POOR' and a.street_id = b.street_id)
           </features>
         </rule>
       </styling_rules>
   
   

Note that in the above query, the user already specified a sdo_filter operator but with four question marks as place holder for the search/viewing window. MapViewer will automatically fill in those values at run time when this theme is viewed.
Also note that this theme, with its definition saved in the database permanently just like a predefined theme, is still treated as a JDBC theme when used by MapViewer. So, all JDBC theme characteristics still apply; for instance, its geometries will never be cached in memory by MapViewer.
For more details, refer to the MapViewer User's Guide, Section 2.3.2.1.

10.  How do I view large coverage data using a global projection?

It's very simple with MapViewer's built-in Azimuthal Equal Distance projection. If  your data is in a geodetic coordinate system, and covers a large area (such as at the continental or global level), then you can enable MapViewer's "use_globular_projection" option, which instructs MapViewer to project your data as you are viewing them.

Here is where in the mapViewerConfig.xml file you can enable this option:

 
    <global_map_config>
       ...
       <rendering allow_local_adjustment="false"
                  use_globular_projection="true" /> 
    </global_map_config>
   

Once you restart MapViewer with the above "use_globular_projection" set to true, you will see that maps that cover large areas will be automatically projected. The projection is completely transparent; for instance, all of the zoom/pan functions in MapViewer will still work with any code changes in your application. The following is an illustration of the mapclient.jsp demo viewing a world map with this option turned on.

A few notes regarding the use_globular_projection option:

o        This feature is experimental in this release. Some aspects of a map request, such as map size, may not be strictly honored when this option is turned on due to the nature of the projection. Also note that this option affects all datasources and any map that may contain geodetic data based themes.

o        The map projection will always be Azimuthal Equidistant in the spherical form. The characteristics of this projection include: all directions or azimuths are correct when measured from the map center; all distances are also at true scale when measured between the map center and any other point on the map.

o        Your data must be in one of the geodetic spatial reference systems (such as those with srid 8265, 8307, et al), in order for them to be projected.

o        The graticule is automatically generated by MapViewer, and is always centered at the current map center, with an equal spacing of 15 decimal degrees between two adjacent parallels or meridians. The graticule can have complex curves due to the nature of the projection. Currently there is no way to turn the graticule off. However the graticule will not be displayed for any map covering less than 45 degrees of data (although the map itself will always be projected as long as it's in the geodetic coordinate system).

11.  When migrating the database used by MapViewer, what are the ways to move all the styles, themes, and map definitions in the schema?

For entries in the user_sdo_styles, user_sdo_themes and user_sdo_maps you should create three temporary tables that can be exported. After importing the data into the new database you would insert the records into the three dictionary tables by selecting the data from your temporary tables. Below is an example:

 
    
    create table my_styles as select * from user_sdo_styles;
    create table my_themes as select * from user_sdo_themes;
    create table my_maps as select * from user_sdo_maps;
    
    -- Export the tables and import them into the new database.
    
    insert into user_sdo_styles select * from my_styles;
    insert into user_sdo_themes select * from my_themes;
    insert into user_sdo_maps select * from my_maps;
 
  

If the schema name changes from one database to the other then you may need to perform a global replace of the style owner defined in the styling_rules of the user_sdo_themes table. For example, if the data was exported from the SCOTT user you may have the following styling rule:

 
    <?xml version="1.0" standalone="yes"?>
    <styling_rules >
      <rule >
        <features style="SCOTT:C.ROSY BROWN STROKE">  </features>
        <label column="STATE" style="SCOTT:T.STATE NAME"> 1 </label>
      </rule>
    </styling_rules>
    

Note that the feature style and label style are prefixed with the schema name that owns the style. If you then import the data into a schema called SPATIAL then you need to change the styling_rules to reflect the new owner of the style. You would accomplish this by using the REPLACE function in SQL. For example:

  
    update user_sdo_themes set styling_rules = replace(styling_rules, 'SCOTT:', 'SPATIAL:');
  

12.  How do I create an SVG map with popup information following mouse movement?

In general, generating an SVG map from MapViewer is no different from generating maps in other formats such as PNG. Whereas for a PNG map you specify the format to be either PNG_URL or PNG_STREAM, for SVG maps you specify the format to be SVG_URL or SVG_STREAM.

One unique and very useful feature of SVG maps is to be able to associate attributes with spatial features being displayed, and as you move the cursor over the features, the attributes are automatically displayed in a pop-up window that follows the cursor movement. The following figure illustrates such a SVG map (click on the Info button then move cursor around):

To create such a map, specify <hidden_info> elements in your theme's styling rule. In the above svg example, the theme for the counties has three <hidden_info> elements corresponding to three attribute columns from its base table. Here is the actual styling rule for the counties theme:

 
        update user_sdo_themes set styling_rules=
        '<?xml version="1.0" standalone="yes"?>
        <styling_rules >
        
        <hidden_info> 
            <field column="county" name="Name"/> 
            <field column="state"  name="State"/> 
            <field column="totpop" name="Population"/> 
        </hidden_info>
        
          <rule >
            <features style="C.FUNNY COLOR">  </features>
            <label column="COUNTY" style="T.CITY NAME"> 1 </label>
          </rule>
        </styling_rules>' where name='COUNTIES';
      
      

Note that the three columns from the base table are listed in the <hidden_info> element : "county", "state", "totpop". For each column, you can also assign a more user-friendly display name to be used in the popup window. The display names are specified through each field's name attribute.

The above example showed <hidden_info> elements in a predefined theme. The following example is a complete map request with a dynamic (JDBC) theme that includes <hidden_info> elements.

 
      <?xml version="1.0" standalone="yes"?>
      <map_request
                   title="svg req"
                   datasource = "tilsmenv"
                   width="500"  height="500"
                   bgcolor="#a6cae0"
                   antialiase="true"
                   format="SVG_URL">
        <box srsName="SDO:8265">
           <coordinates> -122.0, 36.0 -120.0 38.0 </coordinates>
        </box>
        <themes>
          <theme name="county_theme1">
            <jdbc_query
                   spatial_column="geom" render_style="C.FUNNY COLOR" jdbc_srid="8265"
                   datasource="tilsmenv">
              SELECT geom, county, totpop from counties
              
              <hidden_info>
                <field column="county" name="Name"/>
                <field column="totpop" name="Population"/>
              </hidden_info>
              
            </jdbc_query>
          </theme> 
          
          <theme name="THEME_US_ROAD1" />
          <theme name="THEME_US_AIRPORT" />
        </themes>
      </map_request>
 
   

Additional notes about SVG maps. The following MapViewer features are not yet supported in a SVG map:

o        Line style with parallel lines; only the center line style will be preserved in an svg map.

13.  Why don’t the zoom/pan tools work with my SVG maps?

You may also have seen an error message that reads "map is not defined" when you click on the SVG map. Please check the following possible causes.

o        You are not using Microsoft IE browser. Unfortunately at the time no other browser supports full integration with Adobe's SVG plugin which is required to view the SVG maps. We expect this situation to improve but currently IE is required to navigate the SVG maps. Also check the SVG plugin version by right-clicking on the SVG map. It should be at least 3.0.

o        If you are using IE, and you have the latest Adobe SVG plugin (minimum version should be 3.0) installed, then read on.
You need to check the URL that you used to access your web page with the SVG map, and the result svg map's url generated by MapViewer. The host name in both URLs should be exactly the same. For example, if the svg map url generated by MapViewer is "http://my-pc.us.mycompany.com:8888/mapviewer/images/omsmap28.svgz", then the url that you use to access the web page should also look like "http://my-pc.us.mycompany.com:8888/.../mysvgmap.jsp". If you use "http://my-pc:8888/.../mysvgmap.jsp" instead, you'll see the undefined map error.

14.  Is MapViewer compatible with Open Geospatial Consortium (OGC)'s WMS specification?

Yes. Starting with MapViewer 10.1.2, you can configure MapViewer to act as a WMS 1.1.1 compatible server. For more information, please refer to the MapViewer User's Guide.

15.  Can MapViewer display map layers generated from another WMS server?

Yes with 10.1.2. For details please see the answer to this question.

That solution will not work if you are using MapViewer version 9.0.4 or earlier. You can, however, employ the following partial solution. MapViewer lets you specify an arbitrary URL to a background image, through the bgimage attribute of a map request. Construct a valid GetMap request to a WMS server, and use it as the value of the bgimage attribute. MapViewer will then display the result map as its background. For example:

 
<map_request
     title="MapViewer + WMS"
     datasource = "wms"
     bgimage="http://foo.com/cgi-bin/wmserv.exe?
REQUEST=GetMap&map=cntryBound.map&LAYERS=world&
VERSION=1.1.0&BBOX=-125,35,-105,45&
WIDTH=640&HEIGHT=320&FORMAT=image/png" 
     width="640"
     height="320"
     format="PNG_STREAM">
  <box srsName="SDO:8265">
     <coordinates>-125,35,-105,45</coordinates>
  </box>
  <themes>
    <theme name="world"/>
    <theme name="highways"/>
    <theme name="bigcities"/>
  </themes>
</map_request>
 
   

Here bgimage is pointing to a result map returned from the external wms server. Note that you must escape the '&' char in the wms request to '&amp;'.

MapViewer does not support transparent map layers from external wms servers. This will likely be supported in a future version of MapViewer.

16.  Can MapViewer display a theme based on a view?

Yes. When defining a theme that is based on a view, you will first need to register the view's geometry column in user_sdo_geom_metadata. Use the view name as the table_name value when inserting into user_sdo_geom_metadata. If your view is a join view (based on more than one base tables), you must also manually modify the theme's styling_rules to specify a key_column attribute. This attribute tells MapViewer the name of the column in the view that can serve as the id column for the geometries. By default, a predefined theme will use ROWID as the key column when caching/referencing geometries for that theme. With a join view however there is no ROWID. Here is an example of such a theme's styling_rules:

 
    update user_sdo_themes set styling_rules=
            '<?xml version="1.0" standalone="yes"?>
             <styling_rules key_column="gid">
             <rule>
                <features style="L.PH" />
                    <label column="label" style="M.SHIELD1">1</label>
                 </rule>
                 </styling_rules>' where name='MY_VIEW_BASED_THEME1'; 
 
     

17.  How do I place a text label at a specific point on the map, without drawing the point itself?

The trick here is to use a color style that is completely trans