<commit_before>﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>snapTo</title>
    <meta charset="utf-8" />
    <style type="text/css">
        html, body {
            margin: 0px;
            background-color: black;
            height: 100%;
            width: 100%;
        }

        #map {
            width: 100%;
            height: 100%;
        }
    </style>
    <link href="../node_modules/maptalks/dist/maptalks.css" rel="stylesheet" />
    <script src="../node_modules/maptalks/dist/maptalks.js"></script>
     <script src="../dist/maptalks.snapto.js"></script>
    <script type="text/javascript">
        var map;
        function initMap() {
            map = new maptalks.Map('map', {
                center: [109.20749554050774, 34.36776742218806], //[109.20749554050774, 34.36776742218806], //[175.27, -37.79],
                zoom: 3,
                minZoom: 1,
                maxZoom: 10,
                view: {
                    projection: 'EPSG:4326',
                    resolutions: [
                        0.0013748335334806893,
                        0.0006874167667403447,
                        3.4370838337017233E-4,
                        1.7185419168508616E-4,
                        8.592709584254308E-5,
                        4.296354792127154E-5,
                        2.148177396063577E-5,
                        1.0740886980317885E-5,
                        5.370443490158943E-6,
                        2.684032014576556E-6
                    ],
                    fullExtent: {
                        'top': 90,
                        'bottom': 0,
                        'left': 0,
                        'right': 180
                    }
                },
                baseLayer: new maptalks.TileLayer('tile', {
                    tileSystem: [1, -1, -400, 400],
                    urlTemplate: 'http://172.16.31.10:6080/arcgis/rest/services/LT/DeepBlueMap0928touming/MapServer/tile/{z}/{y}/{x}'
                })
            });
        }
        window.onload = function () {
            initMap();
            var layer = new maptalks.VectorLayer('layer').addTo(map);
            var drawTool = new maptalks.DrawTool({
                symbol:{
                    'markerType': 'ellipse',
                    'markerFill': '#f00',
                    'markerLineColor': '#fff',
                    'markerLineWidth': 2,
                    'markerLineOpacity': 1,
                    'markerWidth': 15,
                    'markerHeight': 15,
                    lineColor: '#f00',
                    polygonFill: '#0f0',
                    polygonOpacity:0.6
                },
                mode: 'Point'
            }).addTo(map).disable();
            var snap = new maptalks.SnapTool({
                tolerance: 20,
                mode : 'point'
            });
            snap.addTo(map);
            snap.setLayer(layer);
            snap.bindDrawTool(drawTool);
            //snap.enable();
            drawTool.on('drawstart', function () {<commit_msg>fix demo/index.html<commit_after>﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>snapTo</title>
    <meta charset="utf-8" />
    <style type="text/css">
        html, body {
            margin: 0px;
            background-color: black;
            height: 100%;
            width: 100%;
        }

        #map {
            width: 100%;
            height: 100%;
        }
    </style>
    <link href="../node_modules/maptalks/dist/maptalks.css" rel="stylesheet" />
    <script src="../node_modules/maptalks/dist/maptalks.js"></script>
     <script src="../dist/maptalks.snapto.js"></script>
    <script type="text/javascript">
        var map;
        function initMap() {
            map = new maptalks.Map('map', {
                center: [113.905784, 30.321769],
                zoom: 10,
                minZoom: 1,
                maxZoom: 19,
                view: {
                    projection: 'baidu'
                },
                baseLayer: new maptalks.TileLayer('base', {
                    urlTemplate: 'http://api2.map.bdimg.com/customimage/tile?&x={x}&y={y}&z={z}&udt=20161109&scale=1&styles=t%3Awater%7Ce%3Aall%7Cc%3A%23044161%2Ct%3Aland%7Ce%3Aall%7Cc%3A%23091934%2Ct%3Aboundary%7Ce%3Ag%7Cc%3A%23064f85%2Ct%3Arailway%7Ce%3Aall%7Cv%3Aoff%2Ct%3Ahighway%7Ce%3Ag%7Cc%3A%23004981%2Ct%3Ahighway%7Ce%3Ag.f%7Cc%3A%23005b96%7Cl%3A1%2Ct%3Ahighway%7Ce%3Al%7Cv%3Aon%2Ct%3Aarterial%7Ce%3Ag%7Cc%3A%23004981%7Cl%3A-39%2Ct%3Aarterial%7Ce%3Ag.f%7Cc%3A%2300508b%2Ct%3Agreen%7Ce%3Aall%7Cv%3Aoff%7Cc%3A%23056197%2Ct%3Asubway%7Ce%3Aall%7Cv%3Aoff%2Ct%3Amanmade%7Ce%3Aall%7Cv%3Aoff%2Ct%3Alocal%7Ce%3Aall%7Cv%3Aoff%2Ct%3Aarterial%7Ce%3Al%7Cv%3Aon%2Ct%3Aboundary%7Ce%3Ag.f%7Cc%3A%23029fd4%2Ct%3Abuilding%7Ce%3Aall%7Cc%3A%231a5787%2Ct%3Apoi%7Ce%3Aall%7Cv%3Aoff%2Ct%3Aall%7Ce%3Al%7Cv%3Aoff',
                    subdomains: [2]
                })
            });
        }
        window.onload = function () {
            initMap();
            var layer = new maptalks.VectorLayer('layer').addTo(map);
            var drawTool = new maptalks.DrawTool({
                symbol:{
                    'markerType': 'ellipse',
                    'markerFill': '#f00',
                    'markerLineColor': '#fff',
                    'markerLineWidth': 2,
                    'markerLineOpacity': 1,
                    'markerWidth': 15,
                    'markerHeight': 15,
                    lineColor: '#f00',
                    polygonFill: '#0f0',
                    polygonOpacity:0.6
                },
                mode: 'Point'
            }).addTo(map).disable();
            var snap = new maptalks.SnapTool({
                tolerance: 20,
                mode : 'point'
            });
            snap.addTo(map);
            snap.setLayer(layer);
            snap.bindDrawTool(drawTool);
            //snap.enable();
            drawTool.on('drawstart', function () {
{'fraction_non_alphanumeric': 0.13902157799374074, 'fraction_numerical': 0.09537143798385768, 'mean_word_length': 1.4424778761061947, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '7412012', 'n_tokens_mistral': 2376, 'n_tokens_neox': 1990, 'n_words': 252}