Skip to content

Commit

Permalink
Merge pull request nitaliano#2 from react-native-mapbox-gl/master
Browse files Browse the repository at this point in the history
Sync with master
  • Loading branch information
dorthwein authored Jul 12, 2019
2 parents 410e504 + 0a94d9e commit 49e89a7
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,13 @@ public void run() {

private void updateLocationLayer(@NonNull Style style) {
if (mLocationComponent == null) {
mLocationComponent = getMapboxMap().getLocationComponent();
MapboxMap mapboxMap = getMapboxMap();
mLocationComponent = mapboxMap.getLocationComponent();

LocationComponentOptions.Builder builder = LocationComponentOptions.builder(mContext);
if (!mShowUserLocation) {
builder = builder
.padding(mapboxMap.getPadding())
.backgroundDrawable(R.drawable.empty)
.backgroundDrawableStale(R.drawable.empty)
.bearingDrawable(R.drawable.empty)
Expand Down
4 changes: 3 additions & 1 deletion docs/PointAnnotation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
_**deprecated and buggy, use [SymbolLayer](https://github.com/react-native-mapbox-gl/maps/blob/master/docs/SymbolLayer.md) instead**_

## <MapboxGL.PointAnnotation />
### PointAnnotation represents a one-dimensional shape located at a single geographical coordinate.
### PointAnnotation represents a one-dimensional shape located at a single geographical coordinate. PointAnnotation is legacy, soon to be deprecated, and should use ShapeSource and SymbolLayer instead.

### props
| Prop | Type | Default | Required | Description |
Expand Down
38 changes: 34 additions & 4 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2698,21 +2698,51 @@
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered whenever the currently displayed map region is about to change."
"description": "This event is triggered whenever the currently displayed map region is about to change.",
"params": [
{
"name": "feature",
"description": "The geojson point feature at the camera center, properties contains zoomLevel, visibleBounds",
"type": {
"name": "PointFeature"
},
"optional": false
}
]
},
{
"name": "onRegionIsChanging",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered whenever the currently displayed map region is changing."
"description": "This event is triggered whenever the currently displayed map region is changing.",
"params": [
{
"name": "feature",
"description": "The geojson point feature at the camera center, properties contains zoomLevel, visibleBounds",
"type": {
"name": "PointFeature"
},
"optional": false
}
]
},
{
"name": "onRegionDidChange",
"required": false,
"type": "func",
"default": "none",
"description": "This event is triggered whenever the currently displayed map region finished changing"
"description": "This event is triggered whenever the currently displayed map region finished changing",
"params": [
{
"name": "feature",
"description": "The geojson point feature at the camera center, properties contains zoomLevel, visibleBounds",
"type": {
"name": "PointFeature"
},
"optional": false
}
]
},
{
"name": "onWillStartLoadingMap",
Expand Down Expand Up @@ -2805,7 +2835,7 @@
"name": "MapView"
},
"PointAnnotation": {
"description": "PointAnnotation represents a one-dimensional shape located at a single geographical coordinate.",
"description": "PointAnnotation represents a one-dimensional shape located at a single geographical coordinate. PointAnnotation is legacy, soon to be deprecated, and should use ShapeSource and SymbolLayer instead.",
"displayName": "PointAnnotation",
"methods": [],
"props": [
Expand Down
2 changes: 1 addition & 1 deletion javascript/components/PointAnnotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const styles = StyleSheet.create({
});

/**
* PointAnnotation represents a one-dimensional shape located at a single geographical coordinate.
* PointAnnotation represents a one-dimensional shape located at a single geographical coordinate. PointAnnotation is legacy, soon to be deprecated, and should use ShapeSource and SymbolLayer instead.
*/
class PointAnnotation extends React.PureComponent {
static propTypes = {
Expand Down

0 comments on commit 49e89a7

Please sign in to comment.