Comparing version 1.0.0-beta8 to 1.0.0-beta9
@@ -0,1 +1,5 @@ | ||
## 1.0.0-beta9 | ||
- **Feature** Add language parameter to geocoding API. [#174](https://github.com/mapbox/mapbox-sdk-js/issues/174) | ||
## 1.0.0-beta8 | ||
@@ -2,0 +6,0 @@ |
@@ -8,4 +8,4 @@ 'use strict'; | ||
var API_GEOCODING_FORWARD = '/geocoding/v5/{dataset}/{query}.json{?access_token,proximity,country,types,bbox,limit,autocomplete}'; | ||
var API_GEOCODING_REVERSE = '/geocoding/v5/{dataset}/{longitude},{latitude}.json{?access_token,types,limit}'; | ||
var API_GEOCODING_FORWARD = '/geocoding/v5/{dataset}/{query}.json{?access_token,proximity,country,types,bbox,limit,autocomplete,language}'; | ||
var API_GEOCODING_REVERSE = '/geocoding/v5/{dataset}/{longitude},{latitude}.json{?access_token,types,limit,language}'; | ||
@@ -37,2 +37,3 @@ var REVERSE_GEOCODING_PRECISION = 5; | ||
* Search results will be limited to the bounding box. | ||
* @param {string} options.language Specify the language to use for response text and, for forward geocoding, query result weighting. Options are IETF language tags comprised of a mandatory ISO 639-1 language code and optionally one or more IETF subtags for country or script. More than one value can also be specified, separated by commas. | ||
* @param {string} options.types a comma seperated list of types that filter | ||
@@ -136,2 +137,7 @@ * results to match those specified. See https://www.mapbox.com/developers/api/geocoding/#filter-type | ||
if (options.language) { | ||
invariant(typeof options.language === 'string', 'language option must be string'); | ||
queryOptions.language = options.language; | ||
} | ||
if (options.types) { | ||
@@ -163,2 +169,3 @@ invariant(typeof options.types === 'string', 'types option must be string'); | ||
* the request. | ||
* @param {string} options.language Specify the language to use for response text and, for forward geocoding, query result weighting. Options are IETF language tags comprised of a mandatory ISO 639-1 language code and optionally one or more IETF subtags for country or script. More than one value can also be specified, separated by commas. | ||
* @param {string} options.types a comma seperated list of types that filter | ||
@@ -222,2 +229,7 @@ * results to match those specified. See | ||
if (options.language) { | ||
invariant(typeof options.language === 'string', 'language option must be string'); | ||
queryOptions.language = options.language; | ||
} | ||
if (options.types) { | ||
@@ -224,0 +236,0 @@ invariant(typeof options.types === 'string', 'types option must be string'); |
{ | ||
"name": "mapbox", | ||
"version": "1.0.0-beta8", | ||
"version": "1.0.0-beta9", | ||
"description": "interface to mapbox services", | ||
@@ -5,0 +5,0 @@ "main": "lib/mapbox.js", |
@@ -95,3 +95,3 @@ # mapbox-sdk-js | ||
* directions: `require('mapbox/lib/services/directions')` | ||
* distance: `require('mapbox/lib/services/distance')` | ||
* matrix: `require('mapbox/lib/services/matrix')` | ||
* datasets: `require('mapbox/lib/services/datasets')` | ||
@@ -98,0 +98,0 @@ * styles: `require('mapbox/lib/services/styles')` |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
466421
11102