diff --git a/res/css/custom.css b/res/css/custom.css index a34b00e..1eea6cd 100644 --- a/res/css/custom.css +++ b/res/css/custom.css @@ -5,7 +5,19 @@ height:700px; } +.leaflet-control-geoloc { + background-image: url(/res/img/location.png); + background-position: + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} +.leaflet-control-node { + background-image: url(/res/img/node.png); + background-position: + -webkit-border-radius: 5px 5px 5px 5px; + border-radius: 5px 5px 5px 5px; +} @@ -92,11 +104,6 @@ background: #F7F7F7; } -.leaflet-control-geoloc { - background-image: url(/res/img/location.png); - -webkit-border-radius: 5px 5px 5px 5px; - border-radius: 5px 5px 5px 5px; -} #inputform i { font-size: 10px; diff --git a/res/img/node.png b/res/img/node.png new file mode 100644 index 0000000..f4216ae Binary files /dev/null and b/res/img/node.png differ diff --git a/res/js/loadmap.js.tmpl b/res/js/loadmap.js.tmpl index 0370056..fe14def 100644 --- a/res/js/loadmap.js.tmpl +++ b/res/js/loadmap.js.tmpl @@ -22,6 +22,10 @@ var geolocControl = new L.control({ position: 'topright' }); +var addNode = new L.control({ + position: 'topright' +}); + $(document).ready(function() { $.ajaxSetup({cache:true}); @@ -31,10 +35,17 @@ $(document).ready(function() { return div; }; + addNode.onAdd = function (map) { + var div = L.DomUtil.create('div', 'leaflet-control-zoom leaflet-control'); + div.innerHTML = ''; + return div; + }; + // Populate the map with nodes from /api/all. addNodes(); map.addControl(geolocControl); + map.addControl(addNode); map.addControl(new L.Control.Scale()); //map.locate({setView: true, maxZoom: 3}); diff --git a/res/webpages/index.html.tmpl b/res/webpages/index.html.tmpl index 3f514b2..eda3147 100644 --- a/res/webpages/index.html.tmpl +++ b/res/webpages/index.html.tmpl @@ -2,7 +2,7 @@