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

local layer = {
  Identifier = "ESRI_World_Imagery",
  Name = "ESRI World Imagery",
  Enabled = asset.enabled,
  FilePath = asset.localResource("esri_world_imagery.wms"),
  Description = [[World Imagery provides one meter or better satellite and aerial
    imagery in many parts of the world and lower resolution satellite imagery
    worldwide. The map includes 15m TerraColor imagery at small and mid-scales
    (~1:591M down to ~1:72k) and 2.5m SPOT Imagery (~1:288k to ~1:72k) for the world.
    The map features 0.5m resolution imagery in the continental United States and
    parts of Western Europe from Maxar. Additional Maxar sub-meter imagery is
    featured in many parts of the world. In other parts of the world, imagery at
    different resolutions has been contributed by the GIS User Community. In select
    communities, very high resolution imagery (down to 0.03m) is available down to
    ~1:280 scale. (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 World Imagery",
  Version = "1.1",
  Description = "Main web loaded map layer for Earth. This layer is hosted by ESRI",
  Author = "ESRI",
  URL = "https://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9",
  License = "Esri Master License Agreement"
}
