worldKit supports WMS. WMS is a protocol for supplying a large amount of map imagery over the web; for instance, worldwide satellite coverage.
To set up WMS in worldKit, take the URL of a WMS request and remove the "width" "height" and "bbox" parameters. Set the value of the <wms>
config option to this modified url. A unique "id"
attribute is also required. A "category"
attribute is optional, and can be used to set the visibility of the WMS layer. "width"
attributes optionally set the size of requested tiles; by default they are the size of the map. "maxtiledeg"
sets the degrees of longitude per tile, at the highest level; it's used mainly by OnEarth (below) and by default is 360. "minview"
attributes optionally set the scale range where the WMS is visible.
Recommended OnEarth configuration listed in the next section
. Many other WMS sources are listed at the World Wind Wiki
. Example configuration is below.
wms can result in many simultaneous image requests. <maximgload> sets the maximum number of images downloading at one time. The default is 10. If exceeded, zoom and pan is frozen until the download count drops below this limit.
OnEarth Optimized WMS
is a publicly accessible WMS hosted by NASA, serving high resolution (15m/pixel) imagery produced from the Landsat7 satellite. OnEarth also serves Blue Marble Next Generation, daily snapshots from MODIS satellites, and SRTM topography.
OnEarth is an incredibly valuable resource for open and free web mapping. An optimized tile cache of OnEarth imagery has been assembled, and with proper configuration, worldKit can access this high speed cache. The results are, well, awesome! If global imagery required, the recommendation is to use one of the options below. Do not modify your configuration from the ones seen here -- OnEarth will be overloaded unnecessarily and can potentially result in service disruptions.
First, for Global Landsat Imagery in Pseudocolor
<wms maxtiledeg="256" width="512" height="512" id="WMSGM"> http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&layers=global_mosaic&srs=EPSG:4326&format=image/jpeg&styles=</wms>
For the same in the visual spectrum
<wms maxtiledeg="256" width="512" height="512" id="WMSGM"> http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&layers=global_mosaic&srs=EPSG:4326&format=image/jpeg&styles=visual</wms>
Blue Marble Next Generation
is a beautiful, cloud free, 500 meter/pixel imagery set.
<wms maxtiledeg="256" width="480" height="480" id="BMNG"> http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&layers=BMNG&srs=EPSG:4326&format=image/jpeg&styles=
Blue Marble imagery is available for each month of the year; simply add the month to the styles argument of the WMS url. [Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]
<wms maxtiledeg="256" width="480" height="480" id="BMNG"> http://wms.jpl.nasa.gov/wms.cgi?request=GetMap&layers=BMNG&srs=EPSG:4326&format=image/jpeg&styles=Jan
MODIS Rapid Response
provides rapid access to daily updates of 250m satellite imagery. This distribution has proved valuable for accessing active fire information, and other natural hazards like hurricanes.
There are two satellites with the MODIS instruments, Aqua and Terra. A number of mapping products are available.
- daily_aqua and daily_terra are visual color composites.
- daily_aqua_721 and daily_terra_721 highlight recently burnt areas, and flooded areas.
- daily_aqua_ndvi and daily_terra_ndvia is strongly correlated with the density and state of vegetation.
Replace the "layers" argument in the config settings below with the mapping option you prefer.
<wms maxtiledeg="256" width="512" height="512" id="daily_aqua">
Tiling schemes for map data sources is a hot topic
among open source geo developers. Tiling speeds up access to WMS and other sources dramatically. worldKit already supports tiling schemes for OnEarth, as above
. Tile Map Service
is a specification under active development, and worldKit now supports the global geodetic profile
. A demo is posted here
Configure a TMS with <tilemap>. An "id" attribute, unique to all configured layers & WMS servers, is required. "global_profile" currently must be set to "1". The value of the option is a URL of a TMS server.
<tilemap id="test" global_profile="1">http://mapserver.refractions.net/cgi-bin/tms/1.0.0/global_mosaic/</tilemap>
To overlay semi-transparent (or any) images on top of the base map, and below annotations, use the swflayer
tag in the config.xml file. The value of this tag is a relative or absolute url of a swf, png, gif or jpeg file. Conversion utilities and software such as Adobe Illustrator, and Flash of course, can output swf files.
variable. To import multiple layers, use a single swflayer tag for each. The width and height of the swf file must be passed as attributes to the tag (due to limitations in Flash).
Optional attributes control where and how the layer is displayed.
- "extent": An west,south,east,north bounding box specifying the spatial extent of the layer. It can cover a smaller, larger, or partial area relative to the bounding box of the entire map. By default, the extent is assumed to be the same as the base map.
- "minscale": The minimum zoom level at which the layer is visible. By default it's 1 (ie zoomed all the way out).
- "maxscale": The maximum zoom level at which the layer is visible. By default it's set to the <maxzoom> of the map.
- "preload": Set to "false" and this layer will load only when it's visible. Default is true.
- "mask": Some swf files may extend over the boundaries of the Stage. Set to "true", and only the area covered by "width" and "height" will be visible. Default is false.
<swflayer id="road" width="400" height="200">highways.swf</swflayer>
<swflayer id="bikepath" width="750" height="375" extent="-122.45,37.6,-122.42,37.98" minscale="4" maxscale="32" category="sustainable" preload="false">bikepath.jpg</swflayer>
Templates can be configured, so that under defined regions and scales of the map, an image is requested from a mapping server covering the current viewing area This is basically what supports WMS; Templates allow finer grain control of this feature.
Each swftemplate divides a region into a number of equal sized tiles. As the map is panned and zoomed, each swftemplate is checked to see if a new swflayer should be requested and displayed. The value of <swftemplate>
is the url of a WMS cgi, with the values of the bounding box replaced by "WEST,SOUTH,EAST,NORTH", or a center point with "LAT,LON". All attributes are required, except "category".
- "id": Unique identifier.
- "minscale": The minimum zoom level at which a request is made.
- "maxscale": The maximum zoom level at which a request is made.
- "minview": The minimum zoom level at which the layer is visibile.
- "maxview": The maximum zoom level at which the layer is visible.
- "extent": The east,south,west,north bounding box covered by the entire template.
- "tilewidth": Width of a requested tile.
- "tileheight": Height of a requested tile.
- "spanx": The number of tiles covering the x-axis spread of the region.
- "spany": The number of tiles covering the y-axis spread of the region.
For example, the following swftemplate uses the OnEarth Landsat WMS
. It covers the entire globe, in 2x2 tiles, at zoom levels 1 and greater. In practice, remove linebreaks from the value of this option.
<swftemplate category="landsat" id="landsat" tilewidth="376" tileheight="188" extent="-180,-90,180,90" spanx="2" spany="2" minview="1" maxview="50000" minscale="1" maxscale="2">
swftemplate can result in many simultaneous image requests. <maximgload> sets the maximum number of images downloading at one time. If exceeded, zoom and pan is frozen until the download count drops below this limit.