Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
Bugfixes:
* Search with an empty searchfield after a search was triggered returns
  now results (the first 30 as default)
* Enter button could be used for searching

Features:
* DateRange Heatmap added
* Buttons to go automatic forward and backward in the current set date
* Buttons to go manually forward and backward in the current set date

fixes #12
fixes #9
  • Loading branch information
LarsWese committed Jan 4, 2015
1 parent 92180bb commit 8397e90
Show file tree
Hide file tree
Showing 13 changed files with 910 additions and 136 deletions.
478 changes: 478 additions & 0 deletions lvz-viz-web/css/leaflet.css

Large diffs are not rendered by default.

Binary file added lvz-viz-web/images/polizeiticker.ico
Binary file not shown.
210 changes: 112 additions & 98 deletions lvz-viz-web/index.html
Original file line number Diff line number Diff line change
@@ -1,108 +1,122 @@
<html lang="de" ng-app="lvzViz">

<head>
<meta charset="utf8" />
<meta name="viewport" content="initial-scale=1">
<title>LVZ Polizeiticker</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="css/map.css" />
<link rel="stylesheet" href="css/bootstrap.min.css" />
<script src="js/angular.min.js"></script>
<script src="js/jquery-2.1.1.min.js"></script>
<script src="js/angular-resource.min.js"></script>
<script src="js/ui-bootstrap-tpls-0.11.0.min.js"></script>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
</head>

<body ng-controller="lvzVizCtrl">
<nav>
<div class="container">
<!-- <a href="http://codefor.de"> -->
<head>
<meta charset="utf8" />
<meta name="viewport" content="initial-scale=1">
<title>LVZ Polizeiticker</title>
<link rel="stylesheet" href="css/leaflet.css" />
<link rel="icon" href="images/polizeiticker.ico" type="image/x-icon" />
<link rel="stylesheet" href="css/map.css" />
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/iThing-min.css" type="text/css" />
<script src="js/angular.min.js"></script>
<script src="js/jquery-2.1.1.min.js"></script>
<script src="js/angular-resource.min.js"></script>
<script src="js/ui-bootstrap-tpls-0.11.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script src="js/jquery-2.1.1.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/jQDateRangeSlider-min.js"></script>
<script src="js/leaflet-heat.js"></script>
</head>
<body >
<nav>
<div class="container">
<a href="http://codefor.de">
<img class="img-responsive" src="images/polizeiticker.png" alt="polizeiticker-logo">
<!-- </a> -->
</div>
</nav>

<div class="container main">
<div class="row">
<div class="col-xs-12 col-md-8">
<div id="map"></div>
</a>
</div>
<div class="col-xs-12 col-md-4">
<div class="search">
<form class="input-group">
<input type="text" class="form-control" ng-model="query" placeholder="Suchphrase eingeben">
<span class="input-group-btn">
<button class="btn btn-default" type="button" ng-click="search(0)">
<span class="glyphicon glyphicon-search"></span>Suchen</button>
</span>
</form>
</div>
<div class="results-list">
<div ng-hide="searchquery">
<h1>{{data.totalElements}} Artikel</h1>
</div>
<div ng-show="searchquery">
<h1>{{data.totalElements}} Artikel über {{searchquery}}</h1>
</div>
<div class="panel panel-info text-center" ng-repeat="(key, value) in data.content">
<div class="panel-heading">
<a href="{{value.url}}">{{value.title}}</a>
</div>
<div class="panel-body">
{{value.snippet}}
</nav>
<div class="container main">
<div role="tabpanel" ng-controller="sliderctrl">
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#searches" aria-controls="searches" role="tab" data-toggle="tab" id="blubble">Suche</a></li>
<li role="presentation" ><a href="#statistic" aria-controls="statistic" role="tab" data-toggle="tab" ng-click="create()">Statistiken</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<!-- ######################-->
<!-- HEATMAP-->
<div role="tabpanel" class="tab-pane" id="statistic">

<div class="row" style="padding: 5px">
<div class="col-md-8">
<div class="row" style="padding: 5px">
<div class="row" style="padding: 5px">
<div class="col-xs-12 col-md-12 text-center">
Häufigkeit und Orte der im Polizeiticker (LVZ) beschriebenen Fälle in Leipzig. <br/>
Verändern Sie den Slider um verschiedene Zeitfenster zu sehen.
</div>
</div>
<div class="row" style="padding: 5px">
<div class="col-xs-12 col-md-12">
<div id="slider"></div>
</div>
</div>
<div class="row" style="padding: 5px">
<div my-buttons></div>
</div>
<div class="row" style="padding: 5px">
<div class="col-xs-12 col-md-12">
<div id="map2" style="height:100%;width:100%;"></div>
</div>
</div>
</div>
</div>
<!-- <div class="col-xs-12 col-md-4">
<div my-resultlist></div>
</div> -->
</div>
<div class="panel-footer">
<a href="http://www.lvz-online.de/nachrichten/service/impressum/leipziger-verlags-und-druckereigesellschaft-mbh-co-kg/r-impressum-a-97953.html">{{value.copyright}}</a> veröffentlicht am: {{value.datePublished | date:'dd.MM.yyyy, HH:mm'}} Uhr

</div>
<!-- ######################-->
<!-- DIE SUCHE BEGINNT HIER-->
<div role="tabpanel" class="tab-pane active" id="searches" ng-controller="lvzVizCtrl">
<div class="container" >
<div class="row">
<div class="col-xs-12 col-md-8">
Auf der Karte werden die Orte dargestellt, welche aus den LVZ Polizeiticker Artikeln erkannt wurden. <br/>
Sie können auch über die Suche nach speziellen Orten und Begriffen suchen.
</div>
</div>
<div class="row">
<div class="col-xs-12 col-md-8">
<div id="map"></div>
</div>
<div class="col-xs-12 col-md-4">
<div my-resultlist></div>
</div>
</div>
</div>
</div>
</div>
<div class="text-center">
<pagination total-items="data.totalElements" ng-model="data.number" ng-change="pageChanged()" items-per-page="data.size" boundary-links="true" rotate="false" max-size=5></pagination>
</div>
</div>
</div>
</div>

<footer class="footer">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-6">
<ul class="list-unstyled">
<li>Unser Impressum findet ihr hier: <a href="http://codefor.de/impressum.html">Impressum</a>
</li>
<li>Des Weiteren beziehen wir uns auf die <a href="http://www.lvz-online.de/nachrichten/service/impressum/servicetexte/leistungsschutzrecht/r-servicetexte-a-199230.html">LVZ</a> und hoffen niemanden weh zu tun.</li>
</ul>
</div>
<div class="col-xs-12 col-sm-6">
<ul class="list-unstyled">
<li>Entwickler sind <a href="https://github.com/RicardoUsbeck">Ricardo</a> und <a href="https://github.com/spinner0815">Lars</a>
</li>
<li>Der komplette Code ist auf <a href="https://github.com/CodeforLeipzig/lvz-viz/">github</a>
</li>
</ul>
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-6">
<ul class="list-unstyled">
<li>Unser Impressum findet ihr hier: <a href="http://codefor.de/impressum.html">Impressum</a>
</li>
<li>Des Weiteren beziehen wir uns auf die <a href="http://www.lvz-online.de/nachrichten/service/impressum/servicetexte/leistungsschutzrecht/r-servicetexte-a-199230.html">LVZ</a> und hoffen niemanden weh zu tun.</li>
</ul>
</div>
<div class="col-xs-12 col-sm-6">
<ul class="list-unstyled">
<li>Entwickler sind <a href="https://github.com/RicardoUsbeck">Ricardo</a> und <a href="https://github.com/spinner0815">Lars</a>
</li>
<li>Der komplette Code ist auf <a href="https://github.com/CodeforLeipzig/lvz-viz/">github</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</footer>
</div>
</footer>

<script src="js/map.js"></script>
<script>
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-52779189-1', 'auto');
ga('send', 'pageview');
</script>
</body>

</html>
<script src="js/map.js"></script>
<script src="js/slider.js"></script>
<script src="js/directives.js"></script>
<script src="js/analytics.js"></script>
</body>
</html>
13 changes: 13 additions & 0 deletions lvz-viz-web/js/analytics.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-52779189-1', 'auto');
ga('send', 'pageview');
12 changes: 12 additions & 0 deletions lvz-viz-web/js/directives.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
app.directive('myButtons', function(){
// Runs during compile
return {
templateUrl: 'templates/dateRangeButtons.html'
};
});
app.directive('myResultlist', function(){
// Runs during compile
return {
templateUrl: 'templates/myResultlist.html'
};
});
11 changes: 11 additions & 0 deletions lvz-viz-web/js/leaflet-heat.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 9 additions & 12 deletions lvz-viz-web/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,15 @@ var app = angular.module("lvzViz", ['ngResource', 'ui.bootstrap']);
app.controller('lvzVizCtrl', function($scope, $resource, search, getx) {
$scope.totalItems = 64;
$scope.currentPage = 4;
var map = L.map('map').setView([51.339695, 12.373075], 10);
var map = L.map('map').setView([51.339695, 12.373075], 11);
// // add an OpenStreetMap tile layer
var u_id = 'paesku.jilhmmgd';
// L.tileLayer('http://a.tiles.mapbox.com/v3/' + u_id + '/{z}/{x}/{y}.png', {
// attribution: ' & copy; <a href="https://www.mapbox.com/about/maps/" target="_blank">© Mapbox © OpenStreetMap</a> contributors'
// }).addTo(map);
;
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 markers = new L.FeatureGroup();
// var sidebar = L.control.sidebar('sidebar', {
// position: 'right'
// });
// map.addControl(sidebar);
// sidebar.show();
getx.get({
page: 0,
size: 30,
Expand All @@ -26,6 +20,12 @@ app.controller('lvzVizCtrl', function($scope, $resource, search, getx) {
$scope.data = data
addtoMap(data);
})
$('#blubble').click(function(){
// console.log(L);
// console.log(map)
map._onResize()

})
$scope.search = function(number) {
$scope.searchquery = $scope.query
search.get({
Expand Down Expand Up @@ -82,7 +82,4 @@ app.factory('getx', function($resource) {
size: '@size',
sort: '@sort'
});



})
Loading

0 comments on commit 8397e90

Please sign in to comment.