<commit_before><html>

<head>
	<title>otp.js Leaflet Client</title>

	<script src="../dist/otp.uncompressed.js"></script>
	<script src="../test/util.js"></script>

	<link rel="stylesheet" href="style.css" />
	<link rel="stylesheet" href="../src/narrative.css" />
	<link rel="stylesheet" href="../src/map.css" />

	<link rel="stylesheet" href="../node_modules/leaflet/dist/leaflet.css" />
</head>

<body>
	<div id="narrative"></div>
	<div id="map"></div>

<script type="text/javascript" language="javascript">
$(document).ready(function() {

	var map = L.map('map').setView([51.505, -0.09], 13);

	// add an OpenStreetMap tile layer
	L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
	    attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
	}).addTo(map);

	var api = "http://localhost:8080/opentripplanner-api-webapp/ws/plan"
    var requestModel = new OTP.models.OtpPlanRequest(helpers.testRequest, {urlRoot: api });

    var requestMapView = new OTP.views.OtpRequestMapView({
    	model: requestModel,
    	map: map
    });
    requestMapView.render();

    var narrativeView = new OTP.views.OtpPlanResponseNarrativeView({
        el: $('#narrative'),
        map: map,
    });

    requestModel.on('success', function(response) {
    	//narrativeView.model = response;
        //narrativeView.render();
        narrativeView.newResponse(response);
    });

    requestModel.request();
});
</script>

</body>

</html><commit_msg>add base layer control; make mapquest-osm default for now<commit_after><html>

<head>
	<title>otp.js Leaflet Client</title>

	<script src="../dist/otp.uncompressed.js"></script>
	<script src="../test/util.js"></script>

	<link rel="stylesheet" href="style.css" />
	<link rel="stylesheet" href="../src/narrative.css" />
	<link rel="stylesheet" href="../src/map.css" />

	<link rel="stylesheet" href="../node_modules/leaflet/dist/leaflet.css" />
</head>

<body>
	<div id="narrative"></div>
	<div id="map"></div>

<script type="text/javascript" language="javascript">
$(document).ready(function() {

	var map = L.map('map').setView([51.505, -0.09], 13);

	// add an OpenStreetMap tile layer
	var osmLayer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
	    attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
	});
    
    var mapquestOsmLayer = L.tileLayer('http://{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png', {
        subdomains : ['otile1','otile2','otile3','otile4'],
        attribution : 'Data, imagery and map information provided by <a href="http://open.mapquest.com" target="_blank">MapQuest</a>, <a href="http://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> and contributors.'
    });
    
    var mapquestAerialLayer = L.tileLayer('http://{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', {
        subdomains : ['otile1','otile2','otile3','otile4'],
        attribution : 'Data, imagery and map information provided by <a href="http://open.mapquest.com" target="_blank">MapQuest</a>, <a href="http://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> and contributors.'
    });

    var baseLayers = {
        "MapQuest OSM" : mapquestOsmLayer,
        "MapQuest Aerial" : mapquestAerialLayer,
        "OSM Default" : osmLayer
    };
    L.control.layers(baseLayers).addTo(map);
    mapquestOsmLayer.addTo(map);


	var api = "http://localhost:8080/opentripplanner-api-webapp/ws/plan"
    var requestModel = new OTP.models.OtpPlanRequest(helpers.testRequest, {urlRoot: api });

    var requestMapView = new OTP.views.OtpRequestMapView({
    	model: requestModel,
    	map: map
    });
    requestMapView.render();

    var narrativeView = new OTP.views.OtpPlanResponseNarrativeView({
        el: $('#narrative'),
        map: map,
    });

    requestModel.on('success', function(response) {
    	//narrativeView.model = response;
        //narrativeView.render();
        narrativeView.newResponse(response);
    });

    requestModel.request();
});
</script>

</body>

</html>
{'fraction_non_alphanumeric': 0.1967741935483871, 'fraction_numerical': 0.010421836228287842, 'mean_word_length': 3.681765389082462, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6154036', 'n_tokens_mistral': 1448, 'n_tokens_neox': 1385, 'n_words': 231}