TileProviderByDate

Inherits TileProvider

Members

Name

Documentation

Type

Description

Optional

LayerGroupID

The layer needs to know about the LayerGroupID this but we don’t want it to be part of the parameters struct as that would mean it would be visible to the end user, which we don’t want since this value just comes from whoever creates it, not the user.

Integer

Value of type ‘Integer’

No

Providers

Specifies the list of tile providers and for which times they are used for. The tile provider with the earliest time will be used for all dates prior to that date and the provider with the latest time will be used for all dates afterwards. In between, a provider is used from the specified time until the time of the next provider

Table

Table parameters

No

Table parameters for Providers

Specifies the list of tile providers and for which times they are used for. The tile provider with the earliest time will be used for all dates prior to that date and the provider with the latest time will be used for all dates afterwards. In between, a provider is used from the specified time until the time of the next provider

  • Optional: No

Name

Documentation

Type

Description

Optional

*

Table

No

Asset Examples

 1local globe = asset.require("../../earth")
 2local snpp = asset.require("./definitions/snpp")
 3local noaa20 = asset.require("./definitions/noaa20")
 4local noaa21 = asset.require("./definitions/noaa21")
 5
 6
 7
 8local Layer = {
 9  Identifier = "ESRI_VIIRS_Combo",
10  Name = "ESRI VIIRS Combo",
11  Enabled = asset.enabled,
12  ZIndex = 20,
13  Type = "TileProviderByLevel",
14  LevelTileProviders = {
15    {
16      MaxLevel = 4,
17      TileProvider = {
18        Identifier = "VIIRS_Joint_Layer",
19        Name = "VIIRS Joint Layer",
20        Type = "TileProviderByDate",
21        Providers = {
22          ["2015-11-24"] = snpp.Layer,
23          ["2018-01-05"] = noaa20.Layer,
24          ["2024-04-19"] = noaa21.Layer
25        }
26      }
27    },
28    {
29      MaxLevel = 22,
30      TileProvider = {
31        Identifier = "ESRI_World_Imagery",
32        Name = "ESRI World Imagery",
33        FilePath = asset.resource("esri_world_imagery.wms"),
34        PadTiles = false
35      }
36    }
37  },
38  PadTiles = false,
39  Description = [[Level based layer combining different VIIRS layers and ESRI World
40    Imagery. VIIRS is faded out at tile level 4]]
41}
42
43
44asset.onInitialize(function()
45  openspace.globebrowsing.addLayer(globe.Earth.Identifier, "ColorLayers", Layer)
46end)
47
48asset.onDeinitialize(function()
49  openspace.globebrowsing.deleteLayer(globe.Earth.Identifier, "ColorLayers", Layer)
50end)
51
52asset.export("layer", Layer)
53
54
55
56asset.meta = {
57  Name = "ESRI VIIRS Combo",
58  Description = [[Level based layer combining "VIIRS SNPP (Temporal)" and ESRI World
59  Imagery. "VIIRS SNPP (Temporal)" is faded out at tile level 4]],
60  Author = "OpenSpace Tem",
61  URL = "http://www.openspaceproject.com",
62  License = "MIT License"
63}