<commit_before>﻿$(document).ready(function () {
    var options, init;

    OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;
    OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;
    OpenLayers.Util.onImageLoadErrorColor = 'transparent';
    OpenLayers.Util.onImageLoadError = function () {
        this.src = '/Content/Images/sorry.jpg';
        this.style.backgroundColor = OpenLayers.Util.onImageLoadErrorColor;
    };

    options = {
        wms: 'WMS',
        wmslayers: ['poly_landmarks', 'tiger_roads', 'poi'].join(),
        controls: [],
        maxExtent: new OpenLayers.Bounds(-2.003750834E7, -2.003750834E7, 2.003750834E7, 2.003750834E7),
        resolutions: [
            156543.03390625,
            78271.516953125,
            39135.7584765625,
            19567.87923828125,
            9783.939619140625,
            4891.9698095703125,
            2445.9849047851562,
            1222.9924523925781,
            611.4962261962891,
            305.74811309814453,
            152.87405654907226,
            76.43702827453613,
            38.218514137268066,
            19.109257068634033,
            9.554628534317017,
            4.777314267158508,
            2.388657133579254,
            1.194328566789627,
            0.5971642833948135,
            0.29858214169740677,
            0.14929107084870338,
            0.07464553542435169,
            0.037322767712175846,
            0.018661383856087923,
            0.009330691928043961,
            0.004665345964021981
        ],
        numZoomLevels: 24,
        projection: new OpenLayers.Projection('EPSG:900913'),
        displayProjection: new OpenLayers.Projection('EPSG:4326'),
        units: 'meters',
        format: 'image/png',
        wmsparams: {
            'MAP_TYPE': 'OL'
        }
    };

    init = function () {
        var lon = -73.9529;
        var lat = 40.7723;
        var zoom = 10;
        var map, sharpmap, center, editor;

        map = new OpenLayers.Map('map', options);
        map.addControl(new OpenLayers.Control.PanZoom({
            position: new OpenLayers.Pixel(2, 10)
        }));
        map.addControl(new OpenLayers.Control.MousePosition());
        map.addControl(new OpenLayers.Control.LoadingPanel());

        sharpmap = new OpenLayers.Layer.WMS(
            'SharpMap WMS',
            '/wms.ashx', {
                layers: options.wmslayers,
                service: options.wms,
                version: '1.3.0',
                format: options.format,
                transparent: true
            }, {
                isBaseLayer: false,
                transparent: true,
                visibility: true,
                buffer: 0,
                singleTile: false,
                ratio: 1.5,
                yx: []
            });
        sharpmap.mergeNewParams(options.wmsparams);
        map.addLayers([new OpenLayers.Layer.OSM(), sharpmap]);

        center = new OpenLayers.LonLat(lon, lat);
        center.transform(options.displayProjection, options.projection);
        map.setCenter(center, zoom);

        editor = new OpenLayers.Editor(map, {
            activeControls: [
                'Navigation',
                'SnappingSettings',
                'Separator',
                'SplitFeature',
                'MergeFeature',
                'CleanFeature',
                'DeleteFeature',
                'SelectFeature',
                'Separator',
                'DragFeature',
                'DrawHole',
                'ModifyFeature',
                'Separator'
            ],
            featureTypes: [
                'polygon',
                'path',
                'point'
            ],
            showStatus: function (type, message) {
                alert(message);
            }
        });
        editor.oleUrl = window.location.origin + '/';
        editor.startEditMode();
    };
    init();
});<commit_msg>updated openlayers editor sample<commit_after>﻿$(document).ready(function () {
    var options, init;

    OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;
    OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;
    OpenLayers.Util.onImageLoadErrorColor = 'transparent';
    OpenLayers.Util.onImageLoadError = function () {
        this.src = '/Content/Images/sorry.jpg';
        this.style.backgroundColor = OpenLayers.Util.onImageLoadErrorColor;
    };

    options = {
        controls: [],
        maxExtent: new OpenLayers.Bounds(-2.003750834E7, -2.003750834E7, 2.003750834E7, 2.003750834E7),
        resolutions: [
            156543.03390625,
            78271.516953125,
            39135.7584765625,
            19567.87923828125,
            9783.939619140625,
            4891.9698095703125,
            2445.9849047851562,
            1222.9924523925781,
            611.4962261962891,
            305.74811309814453,
            152.87405654907226,
            76.43702827453613,
            38.218514137268066,
            19.109257068634033,
            9.554628534317017,
            4.777314267158508,
            2.388657133579254,
            1.194328566789627,
            0.5971642833948135,
            0.29858214169740677,
            0.14929107084870338,
            0.07464553542435169,
            0.037322767712175846,
            0.018661383856087923,
            0.009330691928043961,
            0.004665345964021981
        ],
        numZoomLevels: 24,
        projection: new OpenLayers.Projection('EPSG:900913'),
        displayProjection: new OpenLayers.Projection('EPSG:4326'),
        units: 'meters',
        format: 'image/png'
    };

    init = function () {
        var lon = -73.9529;
        var lat = 40.7723;
        var zoom = 10;
        var map, center, editor;

        map = new OpenLayers.Map('map', options);
        map.addControl(new OpenLayers.Control.PanZoom({
            position: new OpenLayers.Pixel(2, 10)
        }));
        map.addControl(new OpenLayers.Control.MousePosition());
        map.addControl(new OpenLayers.Control.LoadingPanel());

        map.addLayers([new OpenLayers.Layer.OSM()]);

        center = new OpenLayers.LonLat(lon, lat);
        center.transform(options.displayProjection, options.projection);
        map.setCenter(center, zoom);

        editor = new OpenLayers.Editor(map, {
            oleUrl: window.location.origin + '/',
            activeControls: [
                'Navigation',
                'SnappingSettings',
                'Separator',
                'SplitFeature',
                'MergeFeature',
                'CleanFeature',
                'DeleteFeature',
                'SelectFeature',
                'Separator',
                'DragFeature',
                'DrawHole',
                'ModifyFeature',
                'Separator'
            ],
            featureTypes: [
                'polygon',
                'path',
                'point'
            ],
            showStatus: function (type, message) {
                alert(message);
            }
        });
        editor.startEditMode();
    };
    init();
});
{'fraction_non_alphanumeric': 0.10636778983438036, 'fraction_numerical': 0.14848657909765847, 'mean_word_length': 1.532537960954447, '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': '7308735', 'n_tokens_mistral': 2779, 'n_tokens_neox': 2096, 'n_words': 310}