1
1
import L from 'leaflet' ;
2
- import Util from '../util' ;
2
+ import { getJSON } from '../util' ;
3
3
4
4
export default {
5
5
class : L . Class . extend ( {
@@ -17,7 +17,7 @@ export default {
17
17
18
18
geocode : function ( query , cb , context ) {
19
19
var _this = this ;
20
- Util . getJSON ( this . options . serviceUrl + "/search" , L . extend ( {
20
+ getJSON ( this . options . serviceUrl + "/search" , L . extend ( {
21
21
'api_key' : this . _apiKey ,
22
22
'text' : query
23
23
} , this . options . geocodingQueryParams ) , function ( data ) {
@@ -27,7 +27,7 @@ export default {
27
27
28
28
suggest : function ( query , cb , context ) {
29
29
var _this = this ;
30
- Util . getJSON ( this . options . serviceUrl + "/autocomplete" , L . extend ( {
30
+ getJSON ( this . options . serviceUrl + "/autocomplete" , L . extend ( {
31
31
'api_key' : this . _apiKey ,
32
32
'text' : query
33
33
} , this . options . geocodingQueryParams ) , L . bind ( function ( data ) {
@@ -40,7 +40,7 @@ export default {
40
40
41
41
reverse : function ( location , scale , cb , context ) {
42
42
var _this = this ;
43
- Util . getJSON ( this . options . serviceUrl + "/reverse" , L . extend ( {
43
+ getJSON ( this . options . serviceUrl + "/reverse" , L . extend ( {
44
44
'api_key' : this . _apiKey ,
45
45
'point.lat' : location . lat ,
46
46
'point.lon' : location . lng
0 commit comments