D.1 WMTS Service for MapViewer

A Web Map Tile Service (WMTS) service in MapViewer is provided through its WMTS server, which is built on MapViewer's map cache server.

That is, this WMTS server delegates a client's WMTS request to MapViewer's map cache server. The OGC operations GetCapabilities, GetTile, and GetFeatureInfo are supported. Two kinds of encoding, KVP and REST, are supported for GetCapabilities and GetTile operations, but for GetFeatureInfo operations only KVP encoding is supported. For a GetFeatureInfo request, the response is encoded in one of the three formats (specified with the infoformat attribute): text/xml, text/html, and application/json.

In general, all map cache tile layers in MapViewer can be accessed through its WMTS service. You can customize each map cache tile layer's accessibility by editing a WMTS service policy file, wmtsConfig.xml, stored in the same folder as the mapViewerConfig.xml file. In WMTS service policy file, you can limit MapViewer's WMTS service by only publishing a subset of all map cache tile layers in MapViewer server (see Customizing WMTS GetCapabilities Responses for details).

Example D-1 and Example D-2 show how to publish a tile layer to MapViewer's WMTS server using a policy file. The first example shows the policy file that specifies a tile layer, and the second shows the tile layer definition.

  • Example D-1 is a WMTS policy file. In this file, only one map cache tile layer named TEST_TL in data source MVDEMO is published to MapViewer's WMTS service. This policy file may also contain service provider related information.

  • Example D-2 is the map tile layer definition for the TEST_TL tile layer in the schema for data source MVDEMO.

Regardless of whether there are additional data sources in the MapViewer server, or additional map cache tile layers in the specified data source, if the policy file is specified as in Example D-1, the only published WMTS layer is map cache tile layer TEST_TL in data source MVDEMO (shown in Example D-2).

Example D-1 WMTS Policy File (wmtConfig.xml)

<wmts_config>
     <public_datasources>
        <public_datasource name="MVDEMO">
          <tile_layers>
            <tile_layer name="TEST_TL"/>
           </tile_layers>
        </public_datasource>
     </public_datasources>
   <ServiceAttributes>              
    <ServiceIdentification> 
            <Title>Web Map Tile Service by myCorp</Title> 
            <Abstract> U.S. maps for state and county boundaries, highway networks, and big cities.</Abstract>
            <Keywords> 
              <Keyword>Maps</Keyword>
              <Keyword>U.S. State, County Boundaries</Keyword>
              <Keyword>U.S. Interstate Highways</Keyword>
              <Keyword>U.S. Cities</Keyword>
            </Keywords> 
            <Fees>none</Fees> 
            <AccessConstraints>none</AccessConstraints> 
    </ServiceIdentification>     
    <ServiceProvider> 
      <ProviderName>provider's name</ProviderName> 
        <ProviderSite url="http://www.myCorp.com/mySite"/> 
        <ServiceContact> 
          <IndividualName>my name</IndividualName> 
          <PositionName>technical support specialist</PositionName> 
          <ContactInfo> 
            <Phone> 
              <Voice>+1 800 321 1234</Voice> 
              <Facsimile>+1 800 321 1235</Facsimile> 
            </Phone> 
            <Address> 
              <DeliveryPoint>123 My Street</DeliveryPoint> 
              <City>Nashua</City> 
              <AdministrativeArea>New Hampshire</AdministrativeArea> 
              <PostalCode>12345-4321</PostalCode> 
              <Country>U.S.</Country> 
              <ElectronicMailAddress>myname@mycompany.com</ElectronicMailAddress> 
            </Address> 
          </ContactInfo> 
      </ServiceContact> 
    </ServiceProvider> 
  </ServiceAttributes>
</wmts_config>

Example D-2 Tile Layer Definition in the Data Source

SQL> select definition from  user_sdo_cached_maps where name='TEST_TL';
 
DEFINITION
--------------------------------------------------------------------------------
<map_tile_layer name="TEST_TL" image_format="PNG" http_header_expires="168.0" concurrent_fetching_threads="3"> 
   <internal_map_source base_map="DEMO_MAP" data_source="MVDEMO"/>
   <coordinate_system srid="8307" minX="-180" maxX="180" minY="-90" maxY="90"/>
   <tile_image width="256" height="256"/>
   <tile_dpi value="90.7142857"/>
   <tile_meters_per_unit value="111319.49079327358"/>
   <zoom_levels levels="19" min_scale="2132.729583849784" max_scale="559082264.0287178">
      <zoom_level tile_width="360.0000" tile_height="360.0000" scale="5.590822640287178E8"/>
      <zoom_level tile_width="180.0000" tile_height="180.0000" scale="2.795411320143589E8"/>
      <zoom_level tile_width="90.0000" tile_height="90.00000" scale="1.3977056600717944E8"/>
      <zoom_level tile_width="45.0000" tile_height="45.00000" scale="6.988528300358972E7"/>
      <zoom_level tile_width="22.5000" tile_height="22.50000" scale="3.494264150179486E7"/>
      <zoom_level tile_width="11.2500" tile_height="11.25000" scale="1.747132075089743E7"/>
      <zoom_level tile_width="5.6250" tile_height="5.62500" scale="8735660.375448715"/>
      <zoom_level tile_width="2.8125" tile_height="2.81250" scale="4367830.1877243575"/>
      <zoom_level tile_width="1.40625" tile_height="1.40625" scale="2183915.0938621787"/>
      <zoom_level tile_width="0.703125" tile_height="0.703125" scale="1091957.5469310894"/>
      <zoom_level tile_width="0.3515625" tile_height="0.3515625" scale="545978.7734655447"/>
      <zoom_level tile_width="0.17578125" tile_height="0.17578125" scale="272989.38673277234"/>
      <zoom_level tile_width="0.087890625" tile_height="0.087890625" scale="136494.693366386"/>
      <zoom_level tile_width="0.0439453125" tile_height="0.0439453125" scale="68247.34668319"/>
      <zoom_level tile_width="0.02197265625" tile_height="0.02197265625" scale="34123.6733415"/>
      <zoom_level tile_width="0.010986328126" tile_height="0.010986328126" scale="17061.8366707"/>
      <zoom_level tile_width="0.0054931640633" tile_height="0.0054931640633" scale="8530.91833539"/>
      <zoom_level tile_width="0.00274658203168" tile_height="0.00274658203168" scale="4265.45916769"/>
      <zoom_level tile_width="0.001373291015841" tile_height="0.001373291015841" scale="2132.72958384"/>
   </zoom_levels>
</map_tile_layer>