GeoWebCache

Changes between Version 8 and Version 9 of virtual_earth

Show
Ignore:
Timestamp:
11/09/09 18:38:00 (10 months ago)
Author:
arneke (IP: 88.163.0.55)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • virtual_earth

    v8 v9  
     1= DEPRECATED = 
    12 
    2 == Virtual Earth integration == 
    3  
    4  
    5 !GeoWebCache can support [http://www.microsoft.com/virtualearth/ Microsoft Virtual Earth] clients. 
    6  
    7 Please see the [http://dev.live.com/virtualearth/sdk/ Virtual Earth Interactive SDK] for details on how to make your own client.  To integrate a layer served by !GeoWebCache with Virtual Earth, you can use the following HTML code as a template. 
    8  
    9 {{{ 
    10 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    11 <html xmlns="http://www.w3.org/1999/xhtml"> 
    12   <head> 
    13     <title>Virtual Earth with GeoWebCache</title> 
    14     <script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1"></script> 
    15     <script type="text/javascript"> 
    16          var map, tileLayer; 
    17          var tileLayerURL = 'http://EXAMPLE.COM:PORT/GEOWEBCACHE_PATH/service/ve?quadkey=%4&format=image/png&layers=YOUR_LAYER'; 
    18          function GetMap() 
    19          { 
    20             map = new VEMap('myMap'); 
    21             map.LoadMap(new VELatLong(39,-96) ,4 ,'r' , false); 
    22             var tileSourceSpec = new VETileSourceSpecification('TITLE_OF_LAYER', tileLayerURL); 
    23             tileSourceSpec.Opacity = 0.5; 
    24                          
    25             map.AddTileLayer(tileSourceSpec, true); 
    26          }   
    27     </script> 
    28   </head> 
    29   <body onload="GetMap();"> 
    30     <div id='myMap' style="position:relative; width:700px; height:500px;"></div> 
    31  
    32 }}} 
    33  
    34 A few notes on this template: 
    35  
    36 1. 
    37  
    38 {{{ 
    39 var tileLayerURL = 'http://EXAMPLE.COM:PORT/GEOWEBCACHE_PATH/service/ve?quadkey=%4&format=image/png&layers=YOUR_LAYER'; 
    40 }}} 
    41  
    42 This line is where the URL containing the layer served by !GeoWebCache is explicitly invoked. Change EXAMPLE.COM:PORT to your website and port number. Change GEOWEBCACHE_PATH to the path of your !GeoWebCache instance (Examples: ''/geowebcache'' or ''/geoserver/gwc''). Change YOUR_LAYER to the name of your layer (Example: ''topp:states'') 
    43  
    44 2. 
    45 {{{ 
    46 map.LoadMap(new VELatLong(39,-96) ,4 ,'r' , false); 
    47 }}} 
    48  
    49 This line sets the default view to 39 lat --96 long, zoom level 4, which shows big regions of the world. It also loads Virtual Earth's 2D map engine by default. To load the 3D map engine by default, for the same location, change the line to the following 
    50  
    51 {{{ 
    52 map.LoadMap(new VELatLong(39,-96), 4, 'r', false, VEMapMode.Mode3D, true); 
    53 }}} 
    54  
    55 3. 
    56 {{{ 
    57 var tileSourceSpec = new VETileSourceSpecification('TITLE_OF_LAYER', tileLayerURL); 
    58 }}} 
    59  
    60 Replace TITLE_OF_LAYER with the name of your layer.  This is a title, not code, so exact syntax isn't necessary here. 
    61  
    62 For more information on syntax in this example, please see the either the [http://dev.live.com/virtualearth/sdk/ Virtual Earth Interactive SDK] or the full [http://msdn.microsoft.com/en-us/library/aa905677.aspx Virtual Earth documentation]. 
    63  
    64  
    65  
    66 '''Without caching''' 
    67  
    68 If you are running version 1.0.1 or greater and the layer, or the global configuration, has been configured with <cacheBypassAllowed>, then you may append {{{&cached=false}}} to the above URL template. This will effectively disable caching and hit the backend server with every request, reducing GeoWebCache to a simple translator. Additionally, you may specify {{{&metatiled=false}}} so that the WMS requests to the backend are not made with {{{tiled=true}}} 
     3This document is deprecated, please see http://geowebcache.org/docs/1.2.0