mapbox-gl-controls
Advanced tools
Comparing version 1.5.6 to 1.5.7
@@ -46,2 +46,3 @@ import mapboxgl from 'mapbox-gl'; | ||
* Can be used to convert value to any measuring units | ||
* @param {Array} [options.font=['Roboto Medium']] - Array of fonts. | ||
*/ | ||
@@ -62,2 +63,3 @@ | ||
this.units = options.units || 'kilometers'; | ||
this.font = options.font || ['Roboto Medium']; | ||
this.labelFormat = options.labelFormat || defaultLabelFormat; | ||
@@ -105,3 +107,3 @@ this.mapClickListener = this.mapClickListener.bind(this); | ||
'text-field': '{text}', | ||
'text-font': ['Roboto Medium'], | ||
'text-font': this.font, | ||
'text-anchor': 'top', | ||
@@ -108,0 +110,0 @@ 'text-size': 12, |
{ | ||
"name": "mapbox-gl-controls", | ||
"version": "1.5.6", | ||
"version": "1.5.7", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "description": "Controls for mapbox-gl", |
@@ -144,2 +144,3 @@ # Mapbox Controls | ||
Can be used to convert value to any measuring units | ||
- `options.font` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** Array of fonts. (optional, default `['Roboto Medium']`) | ||
@@ -146,0 +147,0 @@ #### Styles |
@@ -16,2 +16,3 @@ import mapboxgl from 'mapbox-gl'; | ||
* Can be used to convert value to any measuring units | ||
* @param {Array} [options.font=['Roboto Medium']] - Array of fonts. | ||
*/ | ||
@@ -26,2 +27,3 @@ | ||
this.units = options.units || 'kilometers'; | ||
this.font = options.font || ['Roboto Medium']; | ||
this.labelFormat = options.labelFormat || defaultLabelFormat; | ||
@@ -69,3 +71,3 @@ this.mapClickListener = this.mapClickListener.bind(this); | ||
'text-field': '{text}', | ||
'text-font': ['Roboto Medium'], | ||
'text-font': this.font, | ||
'text-anchor': 'top', | ||
@@ -72,0 +74,0 @@ 'text-size': 12, |
80430
2010
168