local globeIdentifier = asset.require("../../earth").Earth.Identifier

local layer = {
  Identifier = "ESRI_Imagery_World_2D",
  Name = "ESRI Imagery World 2D",
  Enabled = asset.enabled,
  FilePath = asset.localResource("esri_imagery_world_2D.wms"),
  Description = [[This map presents low-resolution imagery for the world and
    high-resolution imagery for the United States and other metropolitan areas around
    the world. The map includes NASA Blue Marble: Next Generation 500m resolution
    imagery at small scales (above 1:1,000,000), i-cubed 15m eSAT imagery at
    medium-to-large scales (down to 1:70,000) for the world, and USGS 15m Landsat
    imagery for Antarctica. It also includes 1m i-cubed Nationwide Select imagery for
    the continental United States, and GeoEye IKONOS 1m resolution imagery for Hawaii,
    parts of Alaska, and several hundred metropolitan areas around the world.
    (Description from URL)]],
}

asset.onInitialize(function()
  openspace.globebrowsing.addLayer(globeIdentifier, "ColorLayers", layer)
end)

asset.onDeinitialize(function()
  openspace.globebrowsing.deleteLayer(globeIdentifier, "ColorLayers", layer)
end)

asset.export("layer", layer)



asset.meta = {
  Name = "ESRI Imagery World 2D",
  Version = "1.1",
  Description = "Older 2D imager map layer for Earth. This layer is hosted by ESRI",
  Author = "ESRI",
  URL = "https://www.arcgis.com/home/item.html?id=21b4ba14d9e5472d97afcbb819f7368e",
  License = "Esri Master License Agreement"
}
