Skip to content

Commit

Permalink
Merge pull request #976 from mapbox/release/6.0.3
Browse files Browse the repository at this point in the history
Update to 6.0.3
  • Loading branch information
nitaliano authored Feb 16, 2018
2 parents 1f582ee + 790b7f3 commit fb14b40
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 6 deletions.
13 changes: 10 additions & 3 deletions docs/MapView.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
| attributionEnabled | `bool` | `true` | `false` | The Mapbox terms of service, which governs the use of Mapbox-hosted vector tiles and styles,<br/>[requires](https://www.mapbox.com/help/how-attribution-works/) these copyright notices to accompany any map that features Mapbox-designed styles, OpenStreetMap data, or other Mapbox data such as satellite or terrain data.<br/>If that applies to this map view, do not hide this view or remove any notices from it.<br/><br/>You are additionally [required](https://www.mapbox.com/help/how-mobile-apps-work/#telemetry) to provide users with the option to disable anonymous usage and location sharing (telemetry).<br/>If this view is hidden, you must implement this setting elsewhere in your app. See our website for [Android](https://www.mapbox.com/android-docs/map-sdk/overview/#telemetry-opt-out) and [iOS](https://www.mapbox.com/ios-sdk/#telemetry_opt_out) for implementation details.<br/><br/>Enable/Disable attribution on map. For iOS you need to add MGLMapboxMetricsEnabledSettingShownInApp=YES<br/>to your Info.plist |
| logoEnabled | `bool` | `true` | `false` | Enable/Disable the logo on the map. |
| compassEnabled | `bool` | `none` | `false` | Enable/Disable the compass from appearing on the map |
| textureMode | `bool` | `false` | `false` | Enable/Disable TextureMode instead of SurfaceView |
| textureMode | `bool` | `false` | `false` | Enable/Disable TextureMode insted of SurfaceView |
| onPress | `func` | `none` | `false` | Map press listener, gets called when a user presses the map |
| onLongPress | `func` | `none` | `false` | Map long press listener, gets called when a user long presses the map |
| onRegionWillChange | `func` | `none` | `false` | This event is triggered whenever the currently displayed map region is about to change. |
Expand Down Expand Up @@ -224,21 +224,22 @@ Takes snapshot of map with current tiles and returns a URI to the image
| `writeToDisk` | `Boolean` | `Yes` | If true will create a temp file, otherwise it is in base64 |



#### getZoom()

Returns the current zoom of the map view.


##### arguments
| Name | Type | Required | Description |
| ---- | :--: | :------: | :----------: |




```javascript
const zoom = await this._map.getZoom();
```


#### getCenter()

Returns the map's geographical centerpoint
Expand All @@ -247,6 +248,12 @@ Returns the map's geographical centerpoint
| Name | Type | Required | Description |
| ---- | :--: | :------: | :----------: |




```javascript
const center = await this._map.getCenter();
```



2 changes: 1 addition & 1 deletion docs/ShapeSource.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| ---- | :--: | :-----: | :------: | :----------: |
| id | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
| url | `string` | `none` | `false` | An HTTP(S) URL, absolute file URL, or local file URL relative to the current application’s resource bundle. |
| shape | `object` | `none` | `false` | The contents of the source. A shape can represent a GeoJSON geometry, a feature, or a feature collection. |
| shape | `object` | `none` | `false` | The contents of the source. A shape can represent a GeoJSON geometry, a feature, or a feature colllection. |
| cluster | `bool` | `none` | `false` | Enables clustering on the source for point shapes. |
| clusterRadius | `number` | `none` | `false` | Specifies the radius of each cluster if clustering is enabled.<br/>A value of 512 produces a radius equal to the width of a tile.<br/>The default value is 50. |
| clusterMaxZoomLevel | `number` | `none` | `false` | Specifies the maximum zoom level at which to cluster points if clustering is enabled.<br/>Defaults to one zoom level less than the value of maxZoomLevel so that, at the maximum zoom level,<br/>the shapes are not clustered. |
Expand Down
36 changes: 36 additions & 0 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,42 @@
},
"description": "Takes snapshot of map with current tiles and returns a URI to the image",
"examples": []
},
{
"name": "getZoom",
"docblock": "Returns the current zoom of the map view.\n\n@example\nconst zoom = await this._map.getZoom();\n\n@return {Number}",
"modifiers": [
"async"
],
"params": [],
"returns": {
"description": null,
"type": {
"name": "Number"
}
},
"description": "Returns the current zoom of the map view.",
"examples": [
"\nconst zoom = await this._map.getZoom();\n\n"
]
},
{
"name": "getCenter",
"docblock": "Returns the map's geographical centerpoint\n\n@example\nconst center = await this._map.getCenter();\n\n@return {Array<Number>} Coordinates",
"modifiers": [
"async"
],
"params": [],
"returns": {
"description": "Coordinates",
"type": {
"name": "Array"
}
},
"description": "Returns the map's geographical centerpoint",
"examples": [
"\nconst center = await this._map.getCenter();\n\n"
]
}
],
"props": [
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"@mapbox/geo-viewport": "^0.2.2",
"@mapbox/react-native-mapbox-gl": "file:../mapbox-react-native-mapbox-gl-6.0.2.tgz",
"@mapbox/react-native-mapbox-gl": "file:../mapbox-react-native-mapbox-gl-6.0.3.tgz",
"@turf/along": "^4.7.3",
"@turf/bearing": "^5.0.0",
"@turf/distance": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mapbox/react-native-mapbox-gl",
"description": "A Mapbox GL react native module for creating custom maps",
"version": "6.0.2",
"version": "6.0.3",
"author": "Bobby Sudekum",
"main": "./javascript/index.js",
"keywords": [
Expand Down

0 comments on commit fb14b40

Please sign in to comment.