diff --git a/src/leaflet.locationlist.css b/src/leaflet.locationlist.css index 1619623..2db0e2b 100644 --- a/src/leaflet.locationlist.css +++ b/src/leaflet.locationlist.css @@ -1,11 +1,11 @@ -.leaflet-bar .leaflet-control-locationlist-arrow-next { +.leaflet-control-locationlist-arrow-next { background-image: url('../img/icon-next.png'); float: left; border-top-left-radius: 0px !important; border-bottom-left-radius: 0px !important; border-top-right-radius: 4px !important; border-bottom-right-radius: 4px !important; } -.leaflet-bar .leaflet-control-locationlist-arrow-prev { +.leaflet-control-locationlist-arrow-prev { background-image: url('../img/icon-prev.png'); float: left; border-top-left-radius: 4px !important; @@ -13,4 +13,23 @@ border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; } +.leaflet-control-locationlist { + background-color : transparent; + text-align:center; +} +.leaflet-control-locationlist-arrows { + background-color : rgba(0,0,0,0); + box-shadow: 0 1px 5px rgba(0,0,0,0.65); + border-radius: 4px; + display:inline-block; +} +.leaflet-control-locationlist-form { + background-color : rgba(0,0,0,0); + box-shadow: 0 1px 5px rgba(0,0,0,0.65); + border-radius: 4px; +} + +.leaflet-control-locationlist-fullist { + border-radius: 4px; +} \ No newline at end of file diff --git a/src/leaflet.locationlist.js b/src/leaflet.locationlist.js index 69916b7..7489f8f 100644 --- a/src/leaflet.locationlist.js +++ b/src/leaflet.locationlist.js @@ -24,19 +24,20 @@ L.Control.LocationList = L.Control.extend({ var className = 'leaflet-control-locationlist', container; - container = this._contentContainer = L.DomUtil.create('div', 'leaflet-bar'); + container = this._contentContainer = L.DomUtil.create('div', className); this._currentLocation_index = 0; + arrowsContainer = L.DomUtil.create('div', className + '-arrows leaflet-bar', container); this._prevButton = this._createButton(this.options.prevText, this.options.prevTitle, - className + '-arrow-prev', container, this._switchPrev, this); + className + '-arrow-prev', arrowsContainer, this._switchPrev, this); this._nextButton = this._createButton(this.options.nextText, this.options.nextTitle, - className + '-arrow-next', container, this._switchNext, this); + className + '-arrow-next', arrowsContainer, this._switchNext, this); if (this.options.showList) { - var form = this._form = L.DomUtil.create('form', className + '-fullist'); + var form = this._form = L.DomUtil.create('form', className + '-form leaflet-bar'); this._fullist = L.DomUtil.create('select', className + '-list', form); this._fullist.style.width = '100%'; @@ -78,8 +79,7 @@ L.Control.LocationList = L.Control.extend({ obj = this.options.locationsList[i]; this._fullist.appendChild(this._createListElement(obj,i)); }; - - console.log(this); + return this; },