Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Améliorations globales du site live.openstreetmap.fr #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions backend/cron-dl.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#! /bin/bash

SEQ=`wget -o /dev/null -O /dev/stdout http://download.openstreetmap.fr/replication/planet/minute/state.txt|grep sequenceNumber|cut -d '=' -f 2`

MM=$[$SEQ/1000000]
KK=$[$SEQ-$MM*1000000]
KK=$[$KK/1000]
Expand All @@ -12,4 +11,4 @@ C=`printf %03d $UU`

echo $A/$B/$C

wget -o /dev/null -O /dev/stdout http://download.openstreetmap.fr/replication/planet/minute/$A/$B/$C.osc.gz|gunzip -c|python compute-changeset-data.py
wget -o /dev/null -O /dev/stdout http://download.openstreetmap.fr/replication/planet/minute/$A/$B/$C.osc.gz|gunzip -c|python compute-changeset-data.py
Binary file added frontend/i/node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/i/osm-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/i/relation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/i/way.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 15 additions & 19 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>OpenStreetMap live edits - live.openstreetmap.fr</title>
<title>OpenStreetMap live edits</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<script src="jquery-1.8.0.min.js"></script>
<script src="highcharts/js/highcharts.js"></script>
<script src="jquery.scrollTo-min.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4/leaflet.css" />
<link rel="icon" href="i/osm-logo.png">
<script src="http://cdn.leafletjs.com/leaflet-0.4/leaflet.js"></script>
<script src="heatcanvas.js"></script>
<script src="heatcanvas-leaflet.js"></script>
Expand All @@ -21,10 +22,8 @@
}

#about {
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
-webkit-box-shadow: rgba(0,0,0,.6) 0px 2px 12px;
-moz-box-shadow: rgba(0,0,0,.6) 0px 2px 12px;;
border-radius: 6px;
box-shadow: rgba(0,0,0,.6) 0px 2px 12px;;
padding: 14px 22px;
width: 400px;
position: relative;
Expand Down Expand Up @@ -60,7 +59,7 @@
display: none;
}

div.counter_tooltip: hover {
div.counter_tooltip:hover {
border: 0;
position: relative;
z-index: 500;
Expand Down Expand Up @@ -286,19 +285,16 @@
</div>

<div id="about">
<a id="close_x" class="close sprited" href="#">close</a>
<center>
<img src="http://www.openstreetmap.org/assets/osm_logo-bd070644a6d1e2ea4db5d1893091b1e7.png">
<h2>OpenStreetMap live edits</h2>
</center>

<ul>
<li>Map data CC-by-SA by <a href="http://www.openstreetmap.org">The OpenStreetMap project</a></li>
<li>Some map tiles by <a href="http://www.mapquest.com">MapQuest</a></li>
</ul>

Source code for the osm-livechanges project can be found on <a href="https://github.com/cstenac/osm-livechanges">Github</a>
<a id="close_x" class="close sprited" href="#">close</a>
<center>
<img src="i/osm-logo.png">
<h2>OpenStreetMap live edits</h2>
</center>

<li>Map data CC-by-SA by <a href="http://www.openstreetmap.org">The OpenStreetMap project</a></li><br/>

Source code for the osm-livechanges project can be found on <a href="https://github.com/osm-fr/osm-livechanges">Github</a>
</div>

</body>
</html>
</html>
33 changes: 14 additions & 19 deletions frontend/livechanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ if (dbg) console.warn("Changeset to zoom on not found !");


$("#currentChangeset").html("Changeset <a target='_blank' href=\"http://osm.org/browse/changeset/" + id + "\">" + id + "</a> by <a target='_blank' href=\"http://osm.org/user/" + user + "\">" + user + "</a> " + getFlagImgHtml(changeset));
$("#detail").html("<img style='padding: 2px; vertical-align:middle;' src='http://wiki.openstreetmap.org/w/images/b/b5/Mf_node.png' width=20 height=20> "
$("#detail").html("<img style='padding: 2px; vertical-align:middle;' src='i/node.png' width=20 height=20> "
+ cnode + " node"+pluriel(cnode)+" added, " + mnode + " modified, " + dnode+" deleted<br>"
+ "<img style='padding: 2px; vertical-align:middle;' src='http://wiki.openstreetmap.org/w/images/6/6a/Mf_way.png' width=20 height=20> "
+ "<img style='padding: 2px; vertical-align:middle;' src='i/way.png' width=20 height=20> "
+ cway + " way"+pluriel(cway)+" added, " + mway + " modified, " + dway +" deleted<br>"
+ "<img style='padding: 2px; vertical-align:middle;' src='http://wiki.openstreetmap.org/w/images/thumb/d/d9/Mf_Relation.svg/20px-Mf_Relation.svg.png' width=20 height=20> "
+ "<img style='padding: 2px; vertical-align:middle;' src='i/relation.png' width=20 height=20> "
+ crel + " relation"+pluriel(crel)+" added, " + mrel + " modified, " + drel +" deleted"
);

Expand Down Expand Up @@ -607,37 +607,32 @@ formatter: function() {

/* Initialize the top map */
{
var mapnik = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 14,
attribution: 'OpenStreetMap'
});
var omq = new L.TileLayer(
var osmfr = new L.TileLayer(
'http://tilecache.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', {
maxZoom: 14,
attribution: '<a href="http://osm.org/">OpenStreetMap</a>',
opacity: 0.5
opacity: 1
});
var nasa = new L.TileLayer(
'http://a.tiles.mapbox.com/v3/mapbox.blue-marble-topo-bathy-jul/{z}/{x}/{y}.png', {
detectRetina: true, reuseTiles: true,
var mapnik = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 14,
attribution: '<a href="http://osm.org/">OpenStreetMap</a> and <a href="http://tiles.mapbox.com/mapbox/map/blue-marble-topo-bathy-jul">NASA Bluemarble@MapBox</a>',
attribution: '<a href="http://osm.org/">OpenStreetMap</a>',
opacity: 1
});
var world = new L.tileLayer('http://{s}.tiles.mapbox.com/v3/mapbox.world-bank-borders-en/{z}/{x}/{y}.png', {
detectRetina: true, reuseTiles: true
var color = new L.TileLayer(
'https://api.mapbox.com/styles/v1/whatismoss/cklwiopfh5e2z17qksl9cach6/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1Ijoid2hhdGlzbW9zcyIsImEiOiJja3E5bmRxNmQwOG5lMnNxdGxuZjNzZmN2In0.qxu3gz1KX3QDze34c6lXLA', {
maxZoom: 14,
attribution: '<a href="http://osm.org/">OpenStreetMap</a> and <a href="https://www.mapbox.com/">Mapbox</a>',
reuseTiles: true
});
var bluemarble = new L.layerGroup([nasa, world]);

heatLayer = new L.TileLayer.HeatCanvas("Heatmap", map, {},
{ 'step' : 0.2, 'degree' : L.TileLayer.HeatCanvas.QUAD, 'opacity': 0.4});

var control = new L.Control.Layers( { "OSM-FR": omq, "OSM.org (Mapnik)": mapnik , "NASA Blue Marble @ Mapbox" : bluemarble}, { "Heat Map" : heatLayer, "Markers" : markersGroup } );
var control = new L.Control.Layers( { "OSM-FR": osmfr , "Mapnik": mapnik , "Colorful Roads" : color}, { "Heat Map" : heatLayer, "Markers" : markersGroup } );
map = new L.Map('map', {
center: new L.LatLng(25, 0),
zoom:3
});
map.addLayer(omq);
map.addLayer(osmfr);
map.addLayer(markersGroup);
map.addControl(control)
}
Expand Down