The following features are supported:
- Map layers available for a country, dataset, taxon (species, subspecies or higher taxon), publisher
- User defined styling by selecting a predefined color palette, or by providing styling rules
- Density of content is clustered to a user defined cluster size (regardless of zoom level)
- The ability to customise content shown by the basis of record (E.g. Specimens, Observations, Fossils etc)
- For certain basis of record types, the time period may be customised by decade; e.g. map the observations of a species since 1970
This service is intended for use with commonly used clients such as the google maps api, leaflet JS library or the modest maps JS library. These libraries allow the GBIF layers to be visualized with other content, such as those coming from web map service (WMS) providers. It should be noted that the mapping api is not a WMS service, nor does it support WFS capabilities. The examples on this page use the leaflet library.
The tile URL format
The format of the url is as follows:
With the following parameters:
|type||required||A value of TAXON, DATASET, COUNTRY or PUBLISHER|
|key||required||The appropriate key for the chosen type (a taxon key, dataset/publisher uuid or 2 letter ISO country code)|
|resolution||optional (default 1)||The number of pixels to which density is aggregated. Valid values are 1, 2, 4, 8, and 16.|
|layer||optional (multivalued)||Declares the layers to be combined by the server for this tile. See Customizing layer content|
|palette||optional||Selects a predefined color palette. See styling a layer|
|colors||optional||Provides a user defined set of rules for coloring the layer. See styling a layer|
|saturation & hue||optional||Allows selection of a hue value between 0.0 and 1.0 when saturation is set to true. See styling a layer|
Customizing layer content
The following layers may be used to instruct the server to combine the content into a single density layer. All layers declared will be combined by the server on rendering. Thus, for a given taxon, country, dataset or provider, it is possible to retrieve e.g:
- A map of specimens only
- A map of specimens and observations
- A map of specimens only, and collected after 1970
- A map of everything observed or collected after 2000
- A map of everything where the year is known
- A map of everything omitting those data known to be living specimens
The quickest way to experiment with this is to use the preview functionality. The specification for the layers are provided below.
- This is a multivalue field so it is expected that several layers are requested in any single URL
- Should no layers be specified, a sensible default is provided. This is to preserve backwards compatibility since layering was an additional feature, and considered acceptable since a map with no layers makes little sense. At present the default returns all layers, but could be subject to future change (e.g. should a layer of records with known issues be added, it might not be included in the default)
|Observations||Observation layers can take no year (&layer=OBS_NO_YEAR), before the 1900s
(&layer=OBS_PRE_1900) or any decade after 1900. The full list is given:
|Specimens||Specimen layers can take no year (&layer=SP_NO_YEAR), before the 1900s
(&layer=SP_PRE_1900) or any decade after 1900. The full list is given:
|Living||If provided, the records with a declared basis of record of living will be included.
|Fossil||If provided, the records with a declared basis of record of fossil will be included.
|Other||Records where the basis of record is unknown, or something other than those above can
take no year (&layer=OTH_NO_YEAR), before the 1900s (&layer=OTH_PRE_1900) or any decade
after 1900. The full list is given:
Styling a layer
Styling the configured layer is controlled through either the &colors parameter, the &palette parameter, or a combination of the &saturation and &hue parameters. If none are provided, a sensible default will be used, which may be subject to change without notice. The quickest way to experiment with this is to use the preview functionality.
Palette and Colors
The possible options for the palette are given:
For example, suppose one wishes to define the following rules:
- Where less than 100 records exist, use a transparent red (#FF000033)
- Where 100-10000 records exist, use a transparent green (#00FF0033)
- Where 10000 or more records exist, use a transparent blue (#0000FF33)
The resultant ruleset (before encoding would be):
Saturation and Hue
If you set &saturation to true then you can specify a &hue between 0.0 and 1.0 and achieve a very different effect when visualizing the GBIF data. These settings are what allow maps as seen on the occurrence homepage. It is a very different way of describing colour from what is described above - Wikipedia has a good introduction to Hue, Saturation, and Brightness.