Source: BKGWebMap/Layer/TopPlus.js

/*
 * Copyright (c) 2013 Bundesamt by Kartographie und Geodäsie.
 * See license.txt in the BKG WebMap distribution or repository for the
 * full text of the license.
 *
 * Author: Dirk Thalheim
 */

/**
 * @requires OpenLayers/Util.js
 * @requires BKGWebMap/Layer/WMS.js
 */

/**
 * @namespace BKGWebMap.Layer.TopPlus
 */
BKGWebMap.Layer.TopPlus = BKGWebMap.Layer.TopPlus || {};

/**
 * Standard Zoomstufen für WMTS der TopPlus
 * @type {Array}
 * @constant
 */
BKGWebMap.Layer.TopPlus.RESOLUTIONS = [
  4891.96981025128,
  2445.98490512564,
  1222.99245256282,
  611.49622628141,
  305.748113140705,
  152.874056570353,
  76.4370282851763,
  38.2185141425881,
  19.1092570712941,
  9.55462853564703,
  4.77731426782352,
  2.38865713391176,
  1.19432856695588,
  0.597164283477939
];

/**
 * Standard Ausdehnungen der TopPlus Web in verschiedenen Georeferenzierungen.
 * @type {Array}
 * @constant
 */
BKGWebMap.Layer.TopPlus.EXTENTS = {
  'EPSG:4326': [-35.999991, 18.404252, 53.999994, 79.321963],
  'EPSG:4258': [-35.999991, 18.404252, 53.999994, 79.321963],
  'EPSG:3857': [-4007500.66668,2084920.24299,6011251.83492,15118001.6086],
  'EPSG:4839': [-2275549.54467,-5292558.65892,3682077.51074,4993562.02194],
  // (U)TM
  'EPSG:25832': [-3803165, 2544188, 3710899, 8805908],
  'EPSG:25833': [-4685824, 2567241, 4894452, 9150159],
  'EPSG:4647': [27314176.5984, 2792539.46025, 37685823.8105, 9150159.19061],
  'EPSG:5650': [28314175.3718, 2567240.50007, 37894452.2542, 9150159.27836],
  'EPSG:3034': [-1057438.6721, 520542.616283, 8864887.45046, 6251362.89001],
  'EPSG:3035': [-464236.973711, 818492.531586, 8921980.96344, 6550663.1929],
  'EPSG:3044': [-4685823.40159, 2792539.46025, 5685823.81047, 9150159.19061],
  'EPSG:3045': [-4685824.62824, 2567240.50007, 4894452.25422, 9150159.27836],
  // GK
  'EPSG:31466': [2411408, 5129732, 3218656, 6235087],
  'EPSG:31467': [3175708, 5133776, 4024237,6207551],
  'EPSG:31468': [3952421,5152678, 4836381,6189322],
  'EPSG:31469': [4718975,5180252, 5646048,6176060],

  'EPSG:5666': [2411408, 5129732, 3218656, 6235087],
  'EPSG:5667': [3175708, 5133776, 4024237,6207551],
  'EPSG:5668': [3952421,5152678, 4836381,6189322],
  'EPSG:5669': [4718975,5180252, 5646048,6176060],

  'EPSG:2397': [2793705.73589, -1687985.69226, 9153978.52059, 8687986.10131],
  'EPSG:2398': [2673377.59478, -687986.919419, 9153978.60838, 9285764.9228],
  'EPSG:2399': [2568312.96902, 312013.080581, 9153978.60838, 9896284.6782]
};


/**
 * Standard Ausdehnungen der TopPlus Web in verschiedenen Georeferenzierungen.
 * @type {Array}
 * @constant
 */
BKGWebMap.Layer.TopPlus.WORLD_EXTENTS = {
  'EPSG:4326': [-180, -85.0511287799, 180, 85.051128779],
  'EPSG:3857': [-20026376,-20037508, 20026376,20037508],

  'EPSG:4258': [-35.999991, 18.404252, 53.999994, 79.321963],
  'EPSG:4839': [-2275549.54467,-5292558.65892,3682077.51074,4993562.02194],
  // (U)TM
  'EPSG:25832': [-1475043, 3033051, 2531929, 8225600],
  'EPSG:25833': [-1735984, 2876434, 1916709,8025789],
  'EPSG:3034': [2122254.2378, 1164627.9290, 5955457.4541, 5021872.0731],
  'EPSG:3035': [2426378.0132, 1528101.2618, 6293974.6215, 5446513.5222],
  // GK
  'EPSG:31466': [2411408, 5129732, 3218656, 6235087],
  'EPSG:31467': [3175708, 5133776, 4024237,6207551],
  'EPSG:31468': [3952421,5152678, 4836381,6189322],
  'EPSG:31469': [4718975,5180252, 5646048,6176060],

  'EPSG:5676': [2411408, 5129732, 3218656, 6235087],
  'EPSG:5677': [3175708, 5133776, 4024237,6207551],
  'EPSG:5678': [3952421,5152678, 4836381,6189322],
  'EPSG:5679': [4718975,5180252, 5646048,6176060]/*,

  'EPSG:4647': [27314176.5984, 2792539.46025, 37685823.8105, 9150159.19061],
  'EPSG:5650': [28314175.3718, 2567240.50007, 37894452.2542, 9150159.27836],
  'EPSG:3044': [-4685823.40159, 2792539.46025, 5685823.81047, 9150159.19061],
  'EPSG:3045': [-4685824.62824, 2567240.50007, 4894452.25422, 9150159.27836],

  'EPSG:2397': [2793705.73589, -1687985.69226, 9153978.52059, 8687986.10131],
  'EPSG:2398': [2673377.59478, -687986.919419, 9153978.60838, 9285764.9228],
  'EPSG:2399': [2568312.96902, 312013.080581, 9153978.60838, 9896284.6782]*/
};

BKGWebMap.Layer.TopPlus.WORLD_RESOLUTIONS = [
  156543.033928, 78271.516964, 39135.758482, 19567.879241, 9783.9396205,
  4891.96981025, 2445.98490513, 1222.99245256, 611.496226281, 305.748113141, 152.87405657,
  76.4370282852, 38.2185141426, 19.1092570713, 9.55462853565, 4.77731426782, 2.38865713391,
  1.19432856696, 0.597164283478
];


/**
 * Standartparameter für den WMS
 */
BKGWebMap.Layer.TopPlus.WMS_DEFAULTS = {
  attribution: BKGWebMap.Layer.COPYRIGHT,
  isBaseLayer: true,
  params: { format: 'image/png', transparent: false }
};

/**
 * Standartparameter für den WMTS TopPlus-Web
 */
BKGWebMap.Layer.TopPlus.WMTS_DEFAULTS = {
  attribution: BKGWebMap.Layer.COPYRIGHT,
  isBaseLayer: true,
  transitionEffect: 'resize',
  style: 'default',
  matrixSet: 'EU_EPSG_25832_TOPPLUS',
  format: 'image/png',
  requestEncoding: 'REST',
  tileOrigin: new OpenLayers.LonLat(-3803165.98427299,8805908.08284866),
  tileSize: new OpenLayers.Size(256,256),
  serverResolutions: BKGWebMap.Layer.TopPlus.RESOLUTIONS
};


/**
 * Standartparameter für den WMTS TopPlus-Web
 */
BKGWebMap.Layer.TopPlus.WORLD_WMTS_DEFAULTS = {
  attribution: BKGWebMap.Layer.COPYRIGHT,
  isBaseLayer: true,
  transitionEffect: 'resize',
  style: 'default',
  matrixSet: 'WEBMERCATOR',
  format: 'image/png',
  requestEncoding: 'REST',
  tileOrigin:  new OpenLayers.LonLat(-20037508.3428, 20037508.3428),
  tileSize: new OpenLayers.Size(256,256),
  serverResolutions: BKGWebMap.Layer.TopPlus.WORLD_RESOLUTIONS
};


// == TopPlus Web Open =================================================================================================

BKGWebMap.Layer.TopPlus.OPEN_ATTRIBUTION =
    '© <a href="http://www.bkg.bund.de/" target="_blank">Bundesamt für Kartographie und Geodäsie</a> ' + new Date().getFullYear() +
    ', <a href="http://sg.geodatenzentrum.de/web_public/Datenquellen_TopPlus_Open.pdf" target="_blank">Datenquellen</a>';

/**
 * Factory-Funktion für WMS TopPlus-Web-Open Normalausgabe
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 */
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB.OPEN'] = function(config, projection) {
  if( !(projection in BKGWebMap.Layer.TopPlus.WORLD_EXTENTS) ) return null;

  var defaults = OpenLayers.Util.extend(null, BKGWebMap.Layer.TopPlus.WMS_DEFAULTS);
  defaults.name = 'TopPlusOpen (Normalausgabe)';
  defaults.url = BKGWebMap.Util.getServiceUrl( 'wms_topplus_open', false, true );
  defaults.singleTile = true;
  defaults.ratio = 1;
  defaults.attribution = BKGWebMap.Layer.TopPlus.OPEN_ATTRIBUTION;

  defaults.maxExtent = BKGWebMap.Util.getMaxExtent(projection, BKGWebMap.Layer.TopPlus.WORLD_EXTENTS);
  defaults.layers = [ { title: 'TopPlus-Web-Open', name: 'web', active: true } ];

  return BKGWebMap.Layer.FACTORIES['BKG.WMS'](config, projection, defaults);
};

/**
 * Factory-Funktion für WMS TopPlus-Web-Open Graustufen
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 */
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB.OPEN.GRAU'] = function(config, projection) {
  if( !(projection in BKGWebMap.Layer.TopPlus.WORLD_EXTENTS) ) return null;
  var defaults = OpenLayers.Util.extend(null, BKGWebMap.Layer.TopPlus.WMS_DEFAULTS);
  defaults.name = 'TopPlusOpen (Graustufen)';
  defaults.url = BKGWebMap.Util.getServiceUrl( 'wms_topplus_open', false, true );
  defaults.singleTile = true;
  defaults.ratio = 1;
  defaults.attribution = BKGWebMap.Layer.TopPlus.OPEN_ATTRIBUTION;

  defaults.maxExtent = BKGWebMap.Util.getMaxExtent(projection, BKGWebMap.Layer.TopPlus.WMS_DEFAULTS);
  defaults.layers = [ { title: 'TopPlus-Web-Open', name: 'web_grau', active: true } ];

  return BKGWebMap.Layer.FACTORIES['BKG.WMS'](config, projection, defaults);
};

/**
 * Factory-Funktion für WMTS TopPlus-Web-Open Normalausgabe
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 */
BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB.OPEN'] = function(config, projection) {
  var defaults = OpenLayers.Util.extend(null, BKGWebMap.Layer.TopPlus.WORLD_WMTS_DEFAULTS);
  defaults = OpenLayers.Util.extend(defaults, {
    name: 'TopPlusOpen (Normalausgabe)',
    url: BKGWebMap.Util.getServiceUrl( 'wmts_topplus_open', 'tile', false, true ),
    layer: 'web',
    attribution: BKGWebMap.Layer.TopPlus.OPEN_ATTRIBUTION
  });
  defaults.maxExtent = BKGWebMap.Util.getMaxExtent(projection, BKGWebMap.Layer.TopPlus.WORLD_EXTENTS);
  defaults.legendURL = BKGWebMap.Util.getServiceUrl( 'wms_topplus_open', '?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&&FORMAT=image/png&LAYER=web', true, true );

  var wmtsConfig = OpenLayers.Util.extend(defaults, config);
  return BKGWebMap.Layer.FACTORIES['WMTS'](wmtsConfig, projection);
};

/**
 * Factory-Funktion für WMTS TopPlus-Web-Open Graustufen
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 */
BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB.OPEN.GRAU'] = function(config, projection) {
  var defaults = OpenLayers.Util.extend(null, BKGWebMap.Layer.TopPlus.WORLD_WMTS_DEFAULTS);
  defaults = OpenLayers.Util.extend(defaults, {
    name: 'TopPlusOpen (Graustufen)',
    url: BKGWebMap.Util.getServiceUrl( 'wmts_topplus_open', 'tile', false, true ),
    layer: 'web_grau',
    attribution: BKGWebMap.Layer.TopPlus.OPEN_ATTRIBUTION
  });
  defaults.maxExtent = BKGWebMap.Util.getMaxExtent(projection, BKGWebMap.Layer.TopPlus.WORLD_EXTENTS);
  defaults.legendURL = BKGWebMap.Util.getServiceUrl( 'wms_topplus_open', '?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&&FORMAT=image/png&LAYER=web_grau', true, true );

  var wmtsConfig = OpenLayers.Util.extend(defaults, config);
  return BKGWebMap.Layer.FACTORIES['WMTS'](wmtsConfig, projection);
};

/**
 * Factory-Funktion für TopPlus-Web-Open Normalausgabe mit automatischer Wahl ob WMS oder WMTS
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 */
BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB.OPEN'] = function(config, projection) {
  var isWMTS = projection == 'EPSG:3857';
  var factory = isWMTS ? 'WMTS.TOPPLUS.WEB.OPEN' : 'WMS.TOPPLUS.WEB.OPEN';
  return BKGWebMap.Layer.FACTORIES[factory](config, projection);
};

/**
 * Factory-Funktion für TopPlus-Web-World Graustufen mit automatischer Wahl ob WMS oder WMTS
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 */
BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB.OPEN.GRAU'] = function(config, projection) {
  var isWMTS = projection == 'EPSG:3857';
  var factory = isWMTS ? 'WMTS.TOPPLUS.WEB.OPEN.GRAU' : 'WMS.TOPPLUS.WEB.OPEN.GRAU';
  return BKGWebMap.Layer.FACTORIES[factory](config, projection);
};

// == TopPlus Open P* ==================================================================================================


/*
 * Registriert die TopPlus-P* Layer-Factories:
 * WMS.TOPPLUS.OPEN.P250
 * WMS.TOPPLUS.OPEN.P250.GRAU
 * WMS.TOPPLUS.OPEN.P100
 * WMS.TOPPLUS.OPEN.P100.GRAU
 * WMS.TOPPLUS.OPEN.P50
 * WMS.TOPPLUS.OPEN.P50.GRAU
 * WMS.TOPPLUS.OPEN.P25
 * WMS.TOPPLUS.OPEN.P25.GRAU
 */
BKGWebMap.Util.each(
    ['5', '10', '17.5', '25', '50', '100','250'],
    function(index, scale) {
      // Für Varianten eine Factory erstellen
      BKGWebMap.Util.each(['', 'grau', 'hell'], function(index, style) {
        var factoryName = 'WMS.TOPPLUS.OPEN.P' + scale;
        var serviceURL  = BKGWebMap.Util.getServiceUrl( 'wms_topplus_open_p' + scale.replaceAll('.5', ''), null, false, true );
        var layer = 'p' + scale;
        var serviceName = 'TopPlus-P' + scale + ' Open';
        if('' != style) {
          factoryName += '.' + style.toUpperCase();
          layer += '_' + style;
          serviceName += ' ' + style;
        }

        BKGWebMap.Layer.FACTORIES[factoryName] = function(config, projection) {
          var defaults = OpenLayers.Util.extend(null, BKGWebMap.Layer.TopPlus.WMS_DEFAULTS);
          defaults.name = serviceName;
          defaults.url = serviceURL;
          defaults.attribution = BKGWebMap.Layer.TopPlus.OPEN_ATTRIBUTION;

          defaults.layers = [ { title: serviceName, name: layer, active: true } ];
          return BKGWebMap.Layer.FACTORIES['BKG.WMS'](config, projection, defaults);
        };
      })
    }
);

// == Deprecated =======================================================================================================

BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P5'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P5']
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P5.GRAU'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P5.GRAU']
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P5.HELL'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P5.HELL']

BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P10'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P10']
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P10.GRAU'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P10.GRAU']
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P10.HELL'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P10.HELL']

BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P17.5'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P17.5']
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P17.5.GRAU'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P17.5.GRAU']
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P17.5.HELL'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P17.5.HELL']

BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P25'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P25']
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P25.GRAU'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P25.GRAU']
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P25.HELL'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P25.HELL']

BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P50'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P50']
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P50.GRAU'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P50.GRAU']
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P50.HELL'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P50.HELL']

BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P100'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P100']
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P100.GRAU'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P100.GRAU']
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P100.HELL'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P100.HELL']

BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P250.EUROPA'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P250']
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P250.EUROPA.GRAU'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P250.GRAU']
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P250.EUROPA.HELL'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.OPEN.P250.HELL']

BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P250'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P250.EUROPA'];
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P250.HELL'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P250.EUROPA.HELL'];
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P250.GRAU'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.P250.EUROPA.GRAU'];


// == TopPlus-Web ======================================================================================================

/**
 * Factory-Funktion für WMS TopPlus-Web Normalausgabe
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 * @deprecated
 */
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB.OPEN'];

/**
 * Factory-Funktion für WMS TopPlus-Web Graustufen
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 * @deprecated
 */
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB.GRAU'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB.OPEN.GRAU'];

/**
 * Factory-Funktion für WMTS TopPlus-Web Normalausgabe
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 * @deprecated
 */
BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB'] = BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB.OPEN'];

/**
 * Factory-Funktion für WMTS TopPlus-Web Graustufen
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 * @deprecated
 */
BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB.GRAU'] = BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB.OPEN.GRAU'];

/**
 * Factory-Funktion für TopPlus-Web Normalausgabe mit automatischer Wahl ob WMS oder WMTS
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 * @deprecated
 */
BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB'] = BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB.OPEN'];

/**
 * Factory-Funktion für TopPlus-Web Graustufen mit automatischer Wahl ob WMS oder WMTS
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 * @deprecated
 */
BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB.GRAU'] = BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB.OPEN.GRAU'];

// == TopPlus-Web World ================================================================================================

/**
 * Factory-Funktion für WMS TopPlus-Web-World Normalausgabe
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 * @deprecated
 */
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB.WORLD'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB.OPEN'];

/**
 * Factory-Funktion für WMS TopPlus-Web-World Graustufen
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 * @deprecated
 */
BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB.WORLD.GRAU'] =  BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB.OPEN.GRAU'];

/**
 * Factory-Funktion für WMTS TopPlus-Web-World Normalausgabe
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 * @deprecated
 */
BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB.WORLD'] = BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB.OPEN'];

/**
 * Factory-Funktion für WMTS TopPlus-Web-World Graustufen
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 * @deprecated
 */
BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB.WORLD.GRAU'] =  BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB.OPEN.GRAU'];

/**
 * Factory-Funktion für TopPlus-Web-World Normalausgabe mit automatischer Wahl ob WMS oder WMTS
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 * @deprecated
 */
BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB.WORLD'] =  BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB.OPEN'];

/**
 * Factory-Funktion für TopPlus-Web-World Graustufen mit automatischer Wahl ob WMS oder WMTS
 *
 * @param config
 * @param projection
 * @returns {OpenLayers.Layer.WMS}
 * @deprecated
 */
BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB.WORLD.GRAU'] =  BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB.OPEN.GRAU'];

// == TopPlus Web Refugees =============================================================================================

BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB.REFUGEES'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB.OPEN'];
BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB.REFUGEES'] = BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB.OPEN'];
BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB.REFUGEES'] = BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB.OPEN'];

// == TopPlus-Web Light ================================================================================================

BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB.LIGHT'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB.OPEN'];
BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB.LIGHT'] = BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB.OPEN'];
BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB.LIGHT'] = BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB.OPEN'];

BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB.LIGHT.GRAU'] = BKGWebMap.Layer.FACTORIES['WMS.TOPPLUS.WEB.OPEN.GRAU'];
BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB.LIGHT.GRAU'] = BKGWebMap.Layer.FACTORIES['WMTS.TOPPLUS.WEB.OPEN.GRAU'];
BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB.LIGHT.GRAU'] = BKGWebMap.Layer.FACTORIES['TOPPLUS.WEB.OPEN.GRAU'];