local globeIdentifier = asset.require("../../charon").Charon.Identifier

local layer = {
  Identifier = "Greyscale_USGS",
  Name = "Black & White [USGS]",
  Enabled = asset.enabled,
  FilePath = "WMS:https://planetarymaps.usgs.gov/cgi-bin/mapserv?map=/maps/pluto/charon_simp_cyl.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=NEWHORIZONS_CHARON_MOSAIC&SRS=EPSG:4326&BBOX=-180,-90.0003,359.972,90",
}

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 = "Charon Black & White [USGS]",
  Version = "1.0",
  Description = [[Charon New Horizons LORRI MVIC Global Mosaic 300m v1. This detailed,
    high-quality global mosaic of Pluto's largest moon, Charon, was assembled from nearly
    all of the highest-resolution images obtained by the Long-Range Reconnaissance Imager
    (LORRI) and the Multispectral Visible Imaging Camera (MVIC) on New Horizons. The
    mosaic is the most detailed and comprehensive global view yet of Charon's surface
    using New Horizons data. Standing out on Charon is an enormous trough at least 350
    kilometers long, and reaching 14 kilometers deep more than seven times as deep as the
    Grand Canyon. This mosaic is available in equirectangular projection at an equatorial
    pixel scale of 300 meters per pixel (m). (Description from URL)]],
  Author = "USGS",
  URL = "https://astrogeology.usgs.gov/search/map/Charon/NewHorizons/" ..
    "Charon_NewHorizons_Global_Mosaic_300m_Jul2017",
  License = "NASA/PDS"
}
