<commit_before>goog.provide('ol.source.MapQuest');

goog.require('goog.asserts');
goog.require('ol.Attribution');
goog.require('ol.source.OSM');
goog.require('ol.source.XYZ');



/**
 * @constructor
 * @extends {ol.source.XYZ}
 * @param {olx.source.MapQuestOptions=} opt_options MapQuest options.
 * @todo stability experimental
 */
ol.source.MapQuest = function(opt_options) {

  var options = goog.isDef(opt_options) ? opt_options : {};
  goog.asserts.assert(options.layer in ol.source.MapQuestConfig);

  var layerConfig = ol.source.MapQuestConfig[options.layer];

  var url = 'http://otile{1-4}.mqcdn.com/tiles/1.0.0/' +
      options.layer + '/{z}/{x}/{y}.jpg';

  goog.base(this, {
    attributions: layerConfig.attributions,
    crossOrigin: 'anonymous',
    logo: 'http://developer.mapquest.com/content/osm/mq_logo.png',
    maxZoom: layerConfig.maxZoom,
    opaque: true,
    tileLoadFunction: options.tileLoadFunction,<commit_msg>Use protocol relative URL in ol.source.MapQuest<commit_after>goog.provide('ol.source.MapQuest');

goog.require('goog.asserts');
goog.require('ol.Attribution');
goog.require('ol.source.OSM');
goog.require('ol.source.XYZ');



/**
 * @constructor
 * @extends {ol.source.XYZ}
 * @param {olx.source.MapQuestOptions=} opt_options MapQuest options.
 * @todo stability experimental
 */
ol.source.MapQuest = function(opt_options) {

  var options = goog.isDef(opt_options) ? opt_options : {};
  goog.asserts.assert(options.layer in ol.source.MapQuestConfig);

  var layerConfig = ol.source.MapQuestConfig[options.layer];

  var url = '//otile{1-4}.mqcdn.com/tiles/1.0.0/' +
      options.layer + '/{z}/{x}/{y}.jpg';

  goog.base(this, {
    attributions: layerConfig.attributions,
    crossOrigin: 'anonymous',
    logo: 'http://developer.mapquest.com/content/osm/mq_logo.png',
    maxZoom: layerConfig.maxZoom,
    opaque: true,
    tileLoadFunction: options.tileLoadFunction,
{'fraction_non_alphanumeric': 0.16605552645364066, 'fraction_numerical': 0.005238344683080147, 'mean_word_length': 4.395480225988701, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7035713', 'n_tokens_mistral': 686, 'n_tokens_neox': 651, 'n_words': 96}