Added support of zoomLevel

pull/18/head
Sami Mokaddem 2017-10-26 09:22:03 +02:00
parent a59d760e59
commit a600a62894
1 changed files with 20 additions and 1 deletions

View File

@ -71,6 +71,18 @@ small {
<div class="navbar-header">
<a class="navbar-brand" href="{{ url_for('geo') }}">Misp Geolocalization</a>
<div id="ledsHolder" style="float: right; height: 50px;">
<div class='leftSepa textTopHeader'>
<strong>Zoom level:</strong>
<select id="zoom_selector">
<option value="18">18</option>
<option value="17">17</option>
<option value="15" selected>15</option>
<option value="13">13</option>
<option value="11">11</option>
<option value="9">9</option>
<option value="7">7</option>
</select>
</div>
<div class='leftSepa textTopHeader'>
<strong>Date: <input type="text" id="datepicker" size="30" style="margin-bottom: 5px;"></strong>
</div>
@ -197,7 +209,7 @@ small {
const OSMURL='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
const OSMATTRIB='Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors';
var ZOOMLEVEL = 17;
var ZOOMLEVEL = 15;
var allOpenStreetMap = {};
var datePickerWidget;
@ -292,6 +304,13 @@ small {
};
datePickerWidget = $( "#datepicker" )
datePickerWidget.datepicker(datePickerOptions);
datePickerWidget.datepicker("setDate", new Date());
$( "#zoom_selector" ).change(function() {
var sel = parseInt($( this ).val());
ZOOMLEVEL = sel;
updateAll();
});
updateAll();