<commit_before>{% block head %}

	<meta content="width=device-width, initial-scale=1.0" name="viewport">

	<!-- Leaflet -->
	<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
	<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />

	<!-- Search	 -->
	<!-- <script src="https://raw.githubusercontent.com/stefanocudini/leaflet-search/master/src/leaflet-search.js" type="text/javascript" ></script> -->
	<!-- <link rel="stylesheet" type="text/css" href="https://raw.githubusercontent.com/stefanocudini/leaflet-search/master/src/leaflet-search.css"> -->

	<!-- Markers -->
	<link rel="stylesheet" href="/static/ndf/leaflet/leaflet.awesome-markers.css">
	<script src="/static/ndf/leaflet/leaflet.awesome-markers.js"></script>

	<!-- Datetimepicker  -->
	<!-- <link rel="stylesheet" media="all" type="text/css" href="/static/ndf/css/jquery-ui.css" /> -->
	<link rel="stylesheet" media="all" type="text/css" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" />
	<script src="/static/ndf/js/jquery-ui.js"></script>
	<script src="/static/ndf/js/jquery-ui-sliderAccess.js"></script>
	<script src="/static/ndf/js/jquery-ui-timepicker-addon.js"></script>
	<link rel="stylesheet" href="/static/ndf/css/jquery-ui-timepicker-addon.css">
	

{% endblock %}

	<style type="text/css">
		
		#map { height: 100%; width: 100%; }

		.leaflet-popup-content {	min-width:166px; max-width: auto;	}

		.leaflet-popup-content > textarea { 
			min-height: 4.5em !important;
			resize:vertical;
		}

		.popup-add-content-button {
			background-color: #199369; color: #FFFFFF; display: block; 
			float: left; padding: 1px 2px; cursor: pointer;	
		}

		.popup-add-content-button:hover { background-color: #00BA7B; }

		.popup-delete-content-button {
			background-color: #d84b33; color: #FFFFFF; display: inline-block; 
			float: right; padding: 1px 2px; cursor: pointer;	
		}

		.popup-delete-content-button:hover { background-color: #f15439; }

	</style>


<body>

	<!-- Popup structure -->
	<div style="display:none; ">
		<div class="popup-html">
			<label>Place Name</label>
			<input type="text" class="marker-place-name" placeholder="Place Name"/>
			<label>Date Time</label>
			<input type="text" class="marker-dtstamp" placeholder="Date Time"/>
			<label>Observations</label>
			<textarea class="marker-obs-note" placeholder="Observation"></textarea>
			<label>Tags</label>
			<input type="text" class="marker-tags" placeholder="Tags"/>
			<!-- <input type="file" class="marker-file-upload" /> -->

			<div class="row">
				<div class="small-push-1 small-4 popup-add-content-button text-center"><i class="fi-page-edit"> &nbsp; edit</i></div>			
				<div class="small-pull-1 small-4 popup-delete-content-button text-center"><i class="fi-trash"> &nbsp; delete</i></div>			
			</div>
		</div>
	</div>

	<div id="map" data-mode="{{ mode }}" data-template-view="{{ template_view }}">
		<input type="hidden" data-map-markers="{{ node.location }}" value="{{ location }}" name="map-geojson-data"/>
	</div>

	<input type="hidden" value="{{ visited_location }}" name="last_visited_location"/>
	
	<script type="text/javascript">
		 
	 	// We’ll add a OSM tile layer to our map
	 	var osmUrl 	  = 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
	 	osmAttrib = '&copy; <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
	 	osm 	  = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});

	 	// instantiate map instantiate
	 	var map = L.map('map').addLayer(osm);

		// getting logged in user last visited location	 	
		$.ajax({

			url: "{% url 'get_visited_location' groupid %}",
  		
  			success: function(data){

  				var lastVisitedLocationVal = JSON.parse(data);
    
			    if(lastVisitedLocationVal)
			    {
			    	if(lastVisitedLocationVal == "[]")
				    {
				    	lastVisitedLocationVal = JSON.parse(lastVisitedLocationVal);
				    }

			 	    if(lastVisitedLocationVal.length > 0)
			    	{
				      	// lastVisitedLocationVal = JSON.parse(lastVisitedLocationVal);
				        var zoom = lastVisitedLocationVal.pop(),
				        lng = lastVisitedLocationVal[1],
				        lat = lastVisitedLocationVal[0];
				        map.setView([lat, lng], zoom);
			      	}
	    		}
	    		// else if( tempArr.length )
			    // {
			    //   var group = new L.featureGroup(tempArr)
			    //       map.fitBounds(group.getBounds());
			    // }<commit_msg>Now map will render properly even if user accessed location is none.<commit_after>{% block head %}

	<meta content="width=device-width, initial-scale=1.0" name="viewport">

	<!-- Leaflet -->
	<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
	<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />

	<!-- Search	 -->
	<!-- <script src="https://raw.githubusercontent.com/stefanocudini/leaflet-search/master/src/leaflet-search.js" type="text/javascript" ></script> -->
	<!-- <link rel="stylesheet" type="text/css" href="https://raw.githubusercontent.com/stefanocudini/leaflet-search/master/src/leaflet-search.css"> -->

	<!-- Markers -->
	<link rel="stylesheet" href="/static/ndf/leaflet/leaflet.awesome-markers.css">
	<script src="/static/ndf/leaflet/leaflet.awesome-markers.js"></script>

	<!-- Datetimepicker  -->
	<!-- <link rel="stylesheet" media="all" type="text/css" href="/static/ndf/css/jquery-ui.css" /> -->
	<link rel="stylesheet" media="all" type="text/css" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" />
	<script src="/static/ndf/js/jquery-ui.js"></script>
	<script src="/static/ndf/js/jquery-ui-sliderAccess.js"></script>
	<script src="/static/ndf/js/jquery-ui-timepicker-addon.js"></script>
	<link rel="stylesheet" href="/static/ndf/css/jquery-ui-timepicker-addon.css">
	

{% endblock %}

	<style type="text/css">
		
		#map { height: 100%; width: 100%; }

		.leaflet-popup-content {	min-width:166px; max-width: auto;	}

		.leaflet-popup-content > textarea { 
			min-height: 4.5em !important;
			resize:vertical;
		}

		.popup-add-content-button {
			background-color: #199369; color: #FFFFFF; display: block; 
			float: left; padding: 1px 2px; cursor: pointer;	
		}

		.popup-add-content-button:hover { background-color: #00BA7B; }

		.popup-delete-content-button {
			background-color: #d84b33; color: #FFFFFF; display: inline-block; 
			float: right; padding: 1px 2px; cursor: pointer;	
		}

		.popup-delete-content-button:hover { background-color: #f15439; }

	</style>


<body>

	<!-- Popup structure -->
	<div style="display:none; ">
		<div class="popup-html">
			<label>Place Name</label>
			<input type="text" class="marker-place-name" placeholder="Place Name"/>
			<label>Date Time</label>
			<input type="text" class="marker-dtstamp" placeholder="Date Time"/>
			<label>Observations</label>
			<textarea class="marker-obs-note" placeholder="Observation"></textarea>
			<label>Tags</label>
			<input type="text" class="marker-tags" placeholder="Tags"/>
			<!-- <input type="file" class="marker-file-upload" /> -->

			<div class="row">
				<div class="small-push-1 small-4 popup-add-content-button text-center"><i class="fi-page-edit"> &nbsp; edit</i></div>			
				<div class="small-pull-1 small-4 popup-delete-content-button text-center"><i class="fi-trash"> &nbsp; delete</i></div>			
			</div>
		</div>
	</div>

	<div id="map" data-mode="{{ mode }}" data-template-view="{{ template_view }}">
		<input type="hidden" data-map-markers="{{ node.location }}" value="{{ location }}" name="map-geojson-data"/>
	</div>

	<input type="hidden" value="{{ visited_location }}" name="last_visited_location"/>
	
	<script type="text/javascript">
		 
	 	// We’ll add a OSM tile layer to our map
	 	var osmUrl 	  = 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
	 	osmAttrib = '&copy; <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
	 	osm 	  = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});

	 	// instantiate map instantiate
	 	var map = L.map('map').addLayer(osm);
	 	map.setView([25.92,79.84], 5);
		// getting logged in user last visited location	 	
		$.ajax({

			url: "{% url 'get_visited_location' groupid %}",
  		
  			success: function(data){

  				var lastVisitedLocationVal = JSON.parse(data);

		    	if(lastVisitedLocationVal == "[]")
			    {
			    	lastVisitedLocationVal = JSON.parse(lastVisitedLocationVal);
			    }

			    if(lastVisitedLocationVal)
			    {
			    	if(lastVisitedLocationVal == "[]")
				    {
				    	lastVisitedLocationVal = JSON.parse(lastVisitedLocationVal);
				    }

			 	    if(lastVisitedLocationVal.length > 0)
			    	{
				      	// lastVisitedLocationVal = JSON.parse(lastVisitedLocationVal);
				        var zoom = lastVisitedLocationVal.pop(),
				        lng = lastVisitedLocationVal[1],
				        lat = lastVisitedLocationVal[0];
				        map.setView([lat, lng], zoom);
			      	}
	    		}
	    		// else if( tempArr.length )
			    // {
			    //   var group = new L.featureGroup(tempArr)
			    //       map.fitBounds(group.getBounds());
			    // }
{'fraction_non_alphanumeric': 0.18783068783068782, 'fraction_numerical': 0.012896825396825396, 'mean_word_length': 3.3473885960709153, 'pattern_counts': {'":': 0, '<': 135, '<?xml version=': 0, '>': 139, 'https://': 4, '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': '1889175', 'n_tokens_mistral': 3553, 'n_tokens_neox': 3089, 'n_words': 512}