File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ a.leaflet-control-geocoder-toggle {
15
15
height : 36px ;
16
16
}
17
17
18
+ a .leaflet-control-geocoder-throbber {
19
+ background-image : url (images/throbber.gif);
20
+ }
21
+
18
22
.leaflet-touch .leaflet-control-geocoder a {
19
23
width : 44px ;
20
24
height : 44px ;
Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ L.Control.Geocoder = L.Control.extend({
70
70
} ,
71
71
72
72
_geocodeResult : function ( results ) {
73
+ var toggle = document . getElementsByClassName ( 'leaflet-control-geocoder-toggle' ) [ 0 ] ;
74
+ toggle . className = toggle . className . replace ( ' leaflet-control-geocoder-throbber' , '' )
73
75
if ( results . length == 1 ) {
74
76
this . options . markGeocode ( results [ 0 ] ) ;
75
77
} else if ( results . length > 0 ) {
@@ -110,6 +112,8 @@ L.Control.Geocoder = L.Control.extend({
110
112
} ,
111
113
112
114
_geocode : function ( event ) {
115
+ var toggle = document . getElementsByClassName ( 'leaflet-control-geocoder-toggle' ) [ 0 ] ;
116
+ toggle . className += ' leaflet-control-geocoder-throbber' ;
113
117
this . _clearResults ( ) ;
114
118
L . DomEvent . preventDefault ( event ) ;
115
119
this . geocode ( this . _input . value ) ;
You can’t perform that action at this time.
0 commit comments