<commit_before>/**
* @license AGPL-3.0
* @author aAXEe (https://github.com/aAXEe)
*/
'use strict';

import ol from 'openlayers'
import ChartLayer from '../chartlayer'
import { layerTileLoadStateChange } from '../../store/actions'

module.exports = function(context, options) {
  let source = new ol.source.OSM({
    url: '//mapproxy.192.168.127.12.xip.io/tiles/1.0.0/osm/osm_grid/{z}/{x}/{y}.png',
    crossOrigin: 'Anonymous'
  });
  source.on(['tileloadstart', 'tileloadend', 'tileloaderror'], function(ev) {
    context.dispatch(layerTileLoadStateChange(options.id, ev));
  });

  var defaults = {
    nameKey: 'layer-name-openstreetmap-base',
    layer: new ol.layer.Tile({
      source: source
    })
  };
  return new ChartLayer(context, Object.assign(defaults, options));
};<commit_msg>use tile server from osm for base map to enable https access<commit_after>/**
* @license AGPL-3.0
* @author aAXEe (https://github.com/aAXEe)
*/
'use strict';

import ol from 'openlayers'
import ChartLayer from '../chartlayer'
import { layerTileLoadStateChange } from '../../store/actions'

module.exports = function(context, options) {
  let source = new ol.source.OSM({
    url: '//{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png',
//    url: '//mapproxy.192.168.127.12.xip.io/tiles/1.0.0/osm/osm_grid/{z}/{x}/{y}.png',
    crossOrigin: 'Anonymous'
  });
  source.on(['tileloadstart', 'tileloadend', 'tileloaderror'], function(ev) {
    context.dispatch(layerTileLoadStateChange(options.id, ev));
  });

  var defaults = {
    nameKey: 'layer-name-openstreetmap-base',
    layer: new ol.layer.Tile({
      source: source
    })
  };
  return new ChartLayer(context, Object.assign(defaults, options));
};
{'fraction_non_alphanumeric': 0.18299881936245574, 'fraction_numerical': 0.018890200708382526, 'mean_word_length': 3.815340909090909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6714175', 'n_tokens_mistral': 612, 'n_tokens_neox': 595, 'n_words': 115}