Skip to content

Options not propagated to mapbox  #97

@dan-castle-rock

Description

@dan-castle-rock

It appears additional query parameters are not being propagated to mapbox. For instance, the addition of proximity is not added when set as an option.

     var proximity = longitude.toString() + ',' + latitude.toString() ;
     var geocoder = L.Control.Geocoder.mapbox( access_token, { geocodingQueryParams : { proximity: proximity } } ) ;

I did a local fix to my installation by doing the following:

        var params = L.extend( { access_token: this._accessToken }, this.options.geocodingQueryParams );

        Util.getJSON(this.options.serviceUrl + encodeURIComponent(query) + '.json', params, function(data) {

for the mapbox geocode function (approximate line 416)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions