Using the KML ReflectorΒΆ

Request a KML file of a layer may include a very cumbersome request:


With the KML Reflector, GeoServer provides the opportunity to request KML with requests simpler using the default values for many of the parameters of a standard WMS request:

  1. Open your browser and enter the following ULR to download the KML using the KML Reflector:


    Standard KML Reflector request


    You have to perform ZoomIn on the Google Earth due to the ScaleDenominator settings inside the layer default SLD.

    The following table lists the default assumptions:

    Key Value
    request GetMap
    service wms
    version 1.1.1
    srs EPSG:4326
    format applcation/
    width 256 for vector layers, 1024 for raster layers
    height 256 for vector layers, 1024 for raster layers
    bbox <layer bounds>
    kmattr true
    kmplacemark false
    kmscore 50
    styles [default style for the featuretype]
  2. Use the following URL to speficying a particular style:


    KML Reflector request with particular style


    The KML reflector can operate in one of three modes: refresh, superoverlay, and download. The mode is set by appending the following parameter to the URL:


    where <mode> is one of the three reflector modes. The details for each mode are as follows:

    Mode Description
    refresh (default for all versions except 1.7.1 through 1.7.5) Returns dynamic KML that can be refreshed/updated by the Google Earth client. Data is refreshed and new data/imagery is downloaded when zooming/panning stops. This mode can return either vector or raster (placemark or overlay) The decision to return either vector or raster data is determined by the value of kmscore.
    superoverlay (default for versions 1.7.1 through 1.7.5) Returns KML as a super-overlay. A super-overlay is a form of KML in which data is broken up into regions.
    download Returns KML which contains the entire data set. In the case of a vector layer, this will include a series of KML placemarks. With raster layers, this will include a single KML ground overlay. This is the only mode that doesn’t dynamically request new data from the server, and thus is self-contained KML.