diff --git a/src/c3nav/control/static/control/control.css b/src/c3nav/control/static/control/control.css
index 7aac6029..fc1392e0 100644
--- a/src/c3nav/control/static/control/control.css
+++ b/src/c3nav/control/static/control/control.css
@@ -13,6 +13,9 @@
top:2px;
}
+.leaflet-biggericon {
+ font-size: 14px;
+}
.leaflet-levels a {
font-size:16px;
color:#333333;
diff --git a/src/c3nav/control/templates/control/editor.html b/src/c3nav/control/templates/control/editor.html
index 3927c64f..e5918363 100644
--- a/src/c3nav/control/templates/control/editor.html
+++ b/src/c3nav/control/templates/control/editor.html
@@ -1,6 +1,5 @@
{% extends 'control/base.html' %}
{% block content %}
-
Editor
{% endblock %}
@@ -23,11 +22,9 @@ L.control.layers([], {
{% endfor %}
L.LevelControl = L.Control.extend({
-
options: {
position: 'bottomright'
},
-
onAdd: function (map) {
var container = L.DomUtil.create('div', 'leaflet-control leaflet-bar leaflet-levels'), link;
{% for level in map.levels reversed %}
@@ -37,10 +34,51 @@ L.LevelControl = L.Control.extend({
{% endfor %}
return container;
}
-
});
map.addControl(new L.LevelControl());
+L.DrawControl = L.Control.extend({
+ options: {
+ position: 'topleft'
+ },
+ onAdd: function (map) {
+ var container = L.DomUtil.create('div', 'leaflet-control leaflet-bar'), link;
+
+ link = L.DomUtil.create('a', 'leaflet-biggericon', container);
+ link.href = '{% url "control.editor" level=level %}';
+ link.title = 'add building'
+ link.innerHTML = '🏠';
+
+ link = L.DomUtil.create('a', 'leaflet-biggericon', container);
+ link.href = '{% url "control.editor" level=level %}';
+ link.title = 'add room/area';
+ link.innerHTML = '⬠';
+
+ link = L.DomUtil.create('a', 'leaflet-biggericon', container);
+ link.href = '{% url "control.editor" level=level %}';
+ link.title = 'add obstacle'
+ link.innerHTML = '⬟';
+
+ link = L.DomUtil.create('a', 'leaflet-biggericon', container);
+ link.href = '{% url "control.editor" level=level %}';
+ link.title = 'add door';
+ link.innerHTML = '🚪';
+
+ link = L.DomUtil.create('a', '', container);
+ link.href = '{% url "control.editor" level=level %}';
+ link.title = 'add steps';
+ link.innerHTML = '┌┘';
+
+ link = L.DomUtil.create('a', 'leaflet-biggericon', container);
+ link.href = '{% url "control.editor" level=level %}';
+ link.title = 'add elevator';
+ link.innerHTML = '▴▾';
+
+ return container;
+ }
+});
+map.addControl(new L.DrawControl());
+
L.control.scale({imperial: false}).addTo(map);