local globeIdentifier = asset.require("../../mercury").Mercury.Identifier

local layer = {
  Identifier = "Messenger_BDR_Sweden",
  Name = "Messenger BDR [Sweden]",
  Enabled = asset.enabled,
  FilePath = asset.localResource("messenger_bdr_sweden.wms"),
  TilePixelSize = 360,
  Description = [[The Map Projected Basemap RDR (BDR) data set consists of a global 
  monochrome map of reflectance at a resolution of 256 pixels per degree (~166 m/p). 
  This edition, version 1, was released May 6, 2016 to the Planetary Data System (PDS) 
  MESSENGER archive. It is compiled using NAC or WAC 750-nm images from any campaign that 
  best fit the intended illumination geometry or low emission angle and incidence angle 
  near 74 degrees. It is controlled and projected onto a global digital elevation model. It uses 
  a Kasseleinin-Shkuratov photometric model, whose parameters are the same for any given 
  wavelength band across all MESSENGER end-of-mission map data products]]
}

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 = "Messenger BDR [Sweden]",
  Version = "1.0",
  Description = [[Mercury MESSENGER MDIS Global Basemap BDR 166m layer for Mercury globe. 
    This map is hosted on the OpenSpace server in Sweden]],
  Author = "USGS",
  URL = "https://astrogeology.usgs.gov/search/map/Mercury/Messenger/Global/Mercury_MESSENGER_MDIS_Basemap_BDR_Mosaic_Global_166m",
  License = "NASA/PDS"
}
