<commit_before>goog.require('ol.Feature');
goog.require('ol.Map');
goog.require('ol.RendererHint');
goog.require('ol.View2D');
goog.require('ol.format.GeoJSON');
goog.require('ol.geom.LineString');
goog.require('ol.layer.Tile');
goog.require('ol.layer.Vector');
goog.require('ol.shape');
goog.require('ol.source.OSM');
goog.require('ol.source.Vector');
goog.require('ol.style.DefaultStyleFunction');


var image = ol.shape.renderCircle(5, null, {color: 'red', width: 1});
var styleFunction = function(feature) {
  switch (feature.getGeometry().getType()) {
    case 'Point':
      return {
        image: image
      };
    case 'Polygon':
      return {
        stroke: {
          color: 'blue',
          width: 3
        },
        fill: {
          color: 'rgba(0, 0, 255, 0.1)'
        }
      };
    case 'MultiLineString':
      return {
        stroke: {
          color: 'green',
          width: 1
        }
      };
    case 'MultiPolygon':
      return {
        stroke: {
          color: 'yellow',
          width: 1
        },
        fill: {
          color: 'rgba(255, 255, 0, 0.1)'
        }
      };
    default:
      return ol.style.DefaultStyleFunction(feature);
  }
};

var vectorSource = new ol.source.Vector();
new ol.format.GeoJSON().readObject({
  'type': 'FeatureCollection',
  'features': [
    {
      'type': 'Feature',
      'geometry': {
        'type': 'Point',
        'coordinates': [0, 0]
      }
    },
    {
      'type': 'Feature',
      'geometry': {
        'type': 'LineString',
        'coordinates': [[4e6, -2e6], [8e6, 2e6]]
      }
    },
    {
      'type': 'Feature',<commit_msg>Don't rely on ol.style.DefaultStyleFunction in GeoJSON example<commit_after>goog.require('ol.Feature');
goog.require('ol.Map');
goog.require('ol.RendererHint');
goog.require('ol.View2D');
goog.require('ol.format.GeoJSON');
goog.require('ol.geom.LineString');
goog.require('ol.layer.Tile');
goog.require('ol.layer.Vector');
goog.require('ol.shape');
goog.require('ol.source.OSM');
goog.require('ol.source.Vector');


var image = ol.shape.renderCircle(5, null, {color: 'red', width: 1});
var styleFunction = function(feature) {
  switch (feature.getGeometry().getType()) {
    case 'Point':
      return {
        image: image
      };
    case 'Polygon':
      return {
        stroke: {
          color: 'blue',
          width: 3
        },
        fill: {
          color: 'rgba(0, 0, 255, 0.1)'
        }
      };
    case 'MultiLineString':
      return {
        stroke: {
          color: 'green',
          width: 1
        }
      };
    case 'MultiPolygon':
      return {
        stroke: {
          color: 'yellow',
          width: 1
        },
        fill: {
          color: 'rgba(255, 255, 0, 0.1)'
        }
      };
    default:
      return {
        stroke: {
          color: 'red',
          width: 2
        },
        fill: {
          color: 'rgba(255, 0, 0, 0.1)'
        }
      };
  }
};

var vectorSource = new ol.source.Vector();
new ol.format.GeoJSON().readObject({
  'type': 'FeatureCollection',
  'features': [
    {
      'type': 'Feature',
      'geometry': {
        'type': 'Point',
        'coordinates': [0, 0]
      }
    },
    {
      'type': 'Feature',
      'geometry': {
        'type': 'LineString',
        'coordinates': [[4e6, -2e6], [8e6, 2e6]]
      }
    },
    {
      'type': 'Feature',
{'fraction_non_alphanumeric': 0.1792816859602256, 'fraction_numerical': 0.0213713268032057, 'mean_word_length': 1.966549295774648, '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': '2053684', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1113, 'n_words': 210}