<commit_before><!doctype html>
<html class="no-js" lang="zh-cn">

<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>Bestaurants</title>
    <meta name="description" content="best restaurants in Belize">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="shortcut icon" type="image/x-icon" href="favicon.ico">

    <!--link css files-->
    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://js.arcgis.com/3.16/esri/css/esri.css">
    <link rel="stylesheet" href="css/main.css">
    <link rel="stylesheet" href="css/layout.css">
    <link rel="stylesheet" href="css/widgets.css">
    <script src="js/vendor/modernizr-2.8.3.min.js"></script>
</head>

<body>
    <!--[if lt IE 8]>
            <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->
    <div id="app">
        <!--place the map  -->
        <div id="app-map">
        </div>

        <div id="app-toolbar">
            <div class="user-center">
                <a href="#"><img src="img/user.png" alt="User picture" class="img-circle"></a>
            </div>
            <div class="tool-container">
                <div class="btn-group" role="group" aria-label="tools">
                    <button type="button" class="btn btn-default">Layers</button>
                    <button type="button" class="btn btn-default">Legend</button>
                    <button type="button" class="btn btn-default">Tools</button>
                    <button type="button" class="btn btn-default">About</button>
                    <button type="button" class="btn btn-default">Help</button>
                </div>
            </div>
        </div>

        <!--<div id="app-map-operate"></div>-->
        <div id="app-sidebar">
            <form class="form-inline">
                <div class="form-group">
                    <!--<label for="restaurants">Restaurants Name:</label>-->
                    <input type="text" class="form-control" placeholder="Search Restaurant">
                </div>
                <select class="form-control">
                    <option selected>All</option>
                    <option>Diner</option>
                    <option>Restaurant</option>
                    <option>Cafe</option>
                    <option>Lounge</option>
                    <option>Bar</option>
                </select>
                <select class="form-control">
                    <option selected>All</option>
                    <option>Poor</option>
                    <option>Fair</option>
                    <option>Average</option>
                    <option>Good</option>
                </select>
                <button type="submit" class="btn btn-primary">Search</button>
            </form>
            <div id="search-result">

            </div>
        </div>
        <div id="app-legend" class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title">Map Legend</h3>
            </div>
            <div class="panel-body">
                <div id="map-legend"></div>
            </div>
        </div>

        <div id="app-map-type"></div>
        <div id="app-logo">
            <img src="" alt="Logo">
        </div>
    </div>

    <script>
        var package_path = window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/'));
        var dojoConfig = {

            //允许异步操作
            async: true,
            // The locationPath logic below may look confusing but all its doing is
            // enabling us to load the api from a CDN and load local modules from the correct location.
            packages: [{
                name: "app",
                location: package_path + '/app'
            }]
        };
    </script>
    <script src="https://code.jquery.com/jquery-1.12.2.min.js"></script>
    <script>
        window.jQuery || document.write('<script src="js/vendor/jquery-1.12.2.min.js"><\/script>')
    </script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
    <script src="https://js.arcgis.com/3.16/"></script>
    <script src="js/plugins.js"></script>
    <script src="js/main.js"></script>
    <script>
        var app = {};
        require([
            "esri/map", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/FeatureLayer",
            "esri/dijit/Legend",
            "esri/SpatialReference", "esri/geometry/Extent",
            "app/config", "dojo/domReady!"],
            function (
                Map, ArcGISDynamicMapServiceLayer,FeatureLayer,
                Legend,
                SpatialReference, Extent,
                appConfig) {


                //new the map according the config.js
                var startExtent = new Extent(appConfig.mapOptions.extentJson);
                app.map = new Map("app-map", {
                    basemap: appConfig.mapOptions.basemap,
                    extent: startExtent
                });


                //add reastaurant layers to the map
                app.layerFoodAndDrinks = new FeatureLayer(appConfig.layers.belizeMapService.url+"/0",{
                    outFields: ["*"]
                });
                app.layerLandBase = new FeatureLayer(appConfig.layers.belizeMapService.url+"/1",{
                    outFields: ["*"]
                });
                app.map.addLayers([app.layerLandBase,app.layerFoodAndDrinks]);


                //add the legend
                var legend = new Legend({
                    map: app.map
                }, appConfig.widgets.legend.id);
                legend.startup();
            });
    </script>
</body>

</html><commit_msg>add infoTemplate for restaurant<commit_after><!doctype html>
<html class="no-js" lang="zh-cn">

<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>Bestaurants</title>
    <meta name="description" content="best restaurants in Belize">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="shortcut icon" type="image/x-icon" href="favicon.ico">

    <!--link css files-->
    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://js.arcgis.com/3.16/esri/css/esri.css">
    <link rel="stylesheet" href="css/main.css">
    <link rel="stylesheet" href="css/layout.css">
    <link rel="stylesheet" href="css/widgets.css">
    <script src="js/vendor/modernizr-2.8.3.min.js"></script>
</head>

<body>
    <!--[if lt IE 8]>
            <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->
    <div id="app">
        <!--place the map  -->
        <div id="app-map">
        </div>

        <div id="app-toolbar">
            <div class="user-center">
                <a href="#"><img src="img/user.png" alt="User picture" class="img-circle"></a>
            </div>
            <div class="tool-container">
                <div class="btn-group" role="group" aria-label="tools">
                    <button type="button" class="btn btn-default">Layers</button>
                    <button type="button" class="btn btn-default">Legend</button>
                    <button type="button" class="btn btn-default">Tools</button>
                    <button type="button" class="btn btn-default">About</button>
                    <button type="button" class="btn btn-default">Help</button>
                </div>
            </div>
        </div>

        <!--<div id="app-map-operate"></div>-->
        <div id="app-sidebar">
            <form class="form-inline">
                <div class="form-group">
                    <!--<label for="restaurants">Restaurants Name:</label>-->
                    <input type="text" class="form-control" placeholder="Search Restaurant">
                </div>
                <select class="form-control">
                    <option selected>All</option>
                    <option>Diner</option>
                    <option>Restaurant</option>
                    <option>Cafe</option>
                    <option>Lounge</option>
                    <option>Bar</option>
                </select>
                <select class="form-control">
                    <option selected>All</option>
                    <option>Poor</option>
                    <option>Fair</option>
                    <option>Average</option>
                    <option>Good</option>
                </select>
                <button type="submit" class="btn btn-primary">Search</button>
            </form>
            <div id="search-result">

            </div>
        </div>
        <div id="app-legend" class="panel panel-primary">
            <div class="panel-heading">
                <h3 class="panel-title">Map Legend</h3>
            </div>
            <div class="panel-body">
                <div id="map-legend"></div>
            </div>
        </div>

        <div id="app-map-type"></div>
        <div id="app-logo">
            <img src="" alt="Logo">
        </div>
    </div>

    <script>
        var package_path = window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/'));
        var dojoConfig = {

            //允许异步操作
            async: true,
            // The locationPath logic below may look confusing but all its doing is
            // enabling us to load the api from a CDN and load local modules from the correct location.
            packages: [{
                name: "app",
                location: package_path + '/app'
            }]
        };
    </script>
    <script src="https://code.jquery.com/jquery-1.12.2.min.js"></script>
    <script>
        window.jQuery || document.write('<script src="js/vendor/jquery-1.12.2.min.js"><\/script>')
    </script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
    <script src="https://js.arcgis.com/3.16/"></script>
    <script src="js/plugins.js"></script>
    <script src="js/main.js"></script>
    <script>
        var app = {};
        require([
            "esri/map", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/FeatureLayer",
            "esri/dijit/Legend",
            "esri/InfoTemplate",
            "esri/SpatialReference", "esri/geometry/Extent",
            "app/config", "dojo/domReady!"],
            function (
                Map, ArcGISDynamicMapServiceLayer,FeatureLayer,
                Legend,InfoTemplate,
                SpatialReference, Extent,
                appConfig) {


                //new the map according the config.js
                var startExtent = new Extent(appConfig.mapOptions.extentJson);
                app.map = new Map("app-map", {
                    basemap: appConfig.mapOptions.basemap,
                    extent: startExtent
                });

                //add reastaurant layers to the map
                app.layerFoodAndDrinks = new FeatureLayer(appConfig.layers.belizeMapService.url+"/0",{
                    outFields: ["*"]
                });
                app.layerLandBase = new FeatureLayer(appConfig.layers.belizeMapService.url+"/1",{
                    outFields: ["*"]
                });
                app.map.addLayers([app.layerLandBase,app.layerFoodAndDrinks]);

                //set the layer infotemplate
                var templateString="<b>${name}</b> [${rating}/5]<br/>"+"${website}<br>"+"${description}";
                //field name is case sensitive(${*},all fields)
                var infoTemplate=new  InfoTemplate("Info",templateString);
                app.layerFoodAndDrinks.setInfoTemplate(infoTemplate);

                //add the legend
                var legend = new Legend({
                    map: app.map
                }, appConfig.widgets.legend.id);
                legend.startup();

            });
    </script>

</body>

</html>
{'fraction_non_alphanumeric': 0.1559899830357864, 'fraction_numerical': 0.005089264076258179, 'mean_word_length': 1.7560106856634017, 'pattern_counts': {'":': 0, '<': 273, '<?xml version=': 0, '>': 273, 'https://': 10, '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': '3332294', 'n_tokens_mistral': 3656, 'n_tokens_neox': 3448, 'n_words': 654}