You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param {Array|String} query An array of coordinates [lng, lat] or location name as a string.
212
209
* @returns {Geocoder} this
213
210
*/
214
-
query: function(query){
211
+
query(query){
215
212
this._query(query);
216
213
returnthis;
217
-
},
214
+
}
218
215
219
216
/**
220
217
* Set input
221
218
* @param {Array|String} value An array of coordinates [lng, lat] or location name as a string. Calling this function just sets the input and does not trigger an API request.
222
219
* @returns {Geocoder} this
223
220
*/
224
-
setInput: function(value){
221
+
setInput(value){
225
222
this._setInput(value);
226
223
returnthis;
227
-
},
224
+
}
228
225
229
226
/**
230
227
* Subscribe to events that happen within the plugin.
@@ -238,32 +235,30 @@ Geocoder.prototype = {
238
235
* @param {Function} fn function that's called when the event is emitted.
239
236
* @returns {Geocoder} this;
240
237
*/
241
-
on: function(type,fn){
238
+
on(type,fn){
242
239
this._ev.on(type,fn);
243
240
returnthis;
244
-
},
241
+
}
245
242
246
243
/**
247
244
* Fire an event
248
245
* @param {String} type event name.
249
246
* @param {Object} data event data to pass to the function subscribed.
250
247
* @returns {Geocoder} this
251
248
*/
252
-
fire: function(type,data){
249
+
fire(type,data){
253
250
this._ev.emit(type,data);
254
251
returnthis;
255
-
},
252
+
}
256
253
257
254
/**
258
255
* Remove an event
259
256
* @returns {Geocoder} this
260
257
* @param {String} type Event name.
261
258
* @param {Function} fn Function that should unsubscribe to the event emitted.
0 commit comments