Skip to content

Commit

Permalink
refactor(examples): refactored Map examples and added metadata (#3158)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfazekas authored Nov 3, 2023
1 parent 37b825c commit bf712e4
Show file tree
Hide file tree
Showing 33 changed files with 643 additions and 345 deletions.
2 changes: 1 addition & 1 deletion docs/Camera.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ number
```
The zoom level used when following the user location.
[Show Map](../examples/Map/ShowMap)
### followPitch
Expand Down
2 changes: 1 addition & 1 deletion docs/FillLayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ boolean
```
The id refers to en existing layer in the style. Does not create a new layer.


[Change Layer Color](../examples/Map/ChangeLayerColor), [Show and hide layer](../examples/Map/ShowAndHideLayer)

### sourceID

Expand Down
2 changes: 1 addition & 1 deletion docs/LineLayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ boolean
```
The id refers to en existing layer in the style. Does not create a new layer.


[Show and hide layer](../examples/Map/ShowAndHideLayer)

### sourceID

Expand Down
30 changes: 15 additions & 15 deletions docs/MapView.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Enable/Disable attribution on map. For iOS you need to add MGLMapboxMetricsEnabl
to your Info.plist

_defaults to:_ `true`

[Ornaments](../examples/Map/Ornaments)

### attributionPosition

Expand All @@ -129,7 +129,7 @@ OrnamentPositonProp
```
Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map. By default on Android, the attribution with information icon (i) will be on the bottom left, while on iOS the mapbox logo will be on bottom left with information icon (i) on bottom right. Read more about mapbox attribution [here](https://docs.mapbox.com/help/getting-started/attribution/)


[Ornaments](../examples/Map/Ornaments)

### tintColor

Expand All @@ -148,7 +148,7 @@ boolean
Enable/Disable the logo on the map.

_defaults to:_ `true`

[Ornaments](../examples/Map/Ornaments)

### logoPosition

Expand All @@ -157,7 +157,7 @@ OrnamentPositonProp
```
Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map


[Ornaments](../examples/Map/Ornaments)

### compassEnabled

Expand All @@ -167,7 +167,7 @@ boolean
Enable/Disable the compass from appearing on the map

_defaults to:_ `false`

[Ornaments](../examples/Map/Ornaments)

### compassFadeWhenNorth

Expand All @@ -177,7 +177,7 @@ boolean
[`mapbox` (v10) implementation only] Enable/Disable if the compass should fade out when the map is pointing north

_defaults to:_ `false`

[Ornaments](../examples/Map/Ornaments)

### compassPosition

Expand All @@ -186,7 +186,7 @@ OrnamentPositonProp
```
[`mapbox` (v10) implementation only] Adds compass offset, e.g. `{top: 8, left: 8}` will put the compass in top-left corner of the map


[Ornaments](../examples/Map/Ornaments)

### compassViewPosition

Expand Down Expand Up @@ -216,7 +216,7 @@ string
```
[iOS, `mapbox` (v10) implementation only] A string referencing an image key. Requires an `Images` component.
[Ornaments](../examples/Map/Ornaments)
### scaleBarEnabled
Expand All @@ -226,7 +226,7 @@ boolean
[`mapbox` (v10) implementation only] Enable/Disable the scale bar from appearing on the map
_defaults to:_ `true`
[Ornaments](../examples/Map/Ornaments)
### scaleBarPosition
Expand All @@ -235,7 +235,7 @@ OrnamentPositonProp
```
[`mapbox` (v10) implementation only] Adds scale bar offset, e.g. `{top: 8, left: 8}` will put the scale bar in top-left corner of the map
[Ornaments](../examples/Map/Ornaments)
### surfaceView
Expand Down Expand Up @@ -272,7 +272,7 @@ when embedded into a scroll view
[`mapbox` (v10) implementation only]
Set map's label locale, e.g. { "locale": "es" } will localize labels to Spanish, { "locale": "current" } will localize labels to system locale.
[Localize Labels](../examples/Map/LocalizeLabels)
### gestureSettings
Expand Down Expand Up @@ -311,7 +311,7 @@ func
Map press listener, gets called when a user presses the map
*signature:*`(feature:GeoJSON.Feature) => void`
[Show Click](../examples/Map/ShowClick)
### onLongPress
Expand All @@ -335,7 +335,7 @@ This event is triggered whenever the currently displayed map region is about to
@param {PointFeature} feature - The geojson point feature at the camera center, properties contains zoomLevel, visibleBounds
*signature:*`(feature:GeoJSON.Feature) => void`


[Show Region Did Change](../examples/Map/ShowRegionDidChange)

### onRegionIsChanging

Expand All @@ -347,7 +347,7 @@ This event is triggered whenever the currently displayed map region is changing.
@param {PointFeature} feature - The geojson point feature at the camera center, properties contains zoomLevel, visibleBounds
*signature:*`(feature:GeoJSON.Feature) => void`


[Show Region Did Change](../examples/Map/ShowRegionDidChange)

### onRegionDidChange

Expand All @@ -359,7 +359,7 @@ This event is triggered whenever the currently displayed map region finished cha
@param {PointFeature} feature - The geojson point feature at the camera center, properties contains zoomLevel, visibleBounds
*signature:*`(feature:GeoJSON.Feature) => void`


[Show Region Did Change](../examples/Map/ShowRegionDidChange)

### onCameraChanged

Expand Down
6 changes: 3 additions & 3 deletions docs/OfflineManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ await Mapbox.offlineManager.createPack({
```


### invalidatePack(name)
[Offline Example](../examples/Map/OfflineExample)### invalidatePack(name)

Invalidates the specified offline pack. This method checks that the tiles in the specified offline pack match those from the server. Local tiles that do not match the latest version on the server are updated.This is more efficient than deleting the offline pack and downloading it again. If the data stored locally matches that on the server, new data will not be downloaded.

Expand Down Expand Up @@ -170,7 +170,7 @@ const offlinePacks = await Mapbox.offlineManager.getPacks();
```


### getPack(name)
[Offline Example](../examples/Map/OfflineExample)### getPack(name)

Retrieves an offline pack that is stored in the database by name.

Expand All @@ -186,7 +186,7 @@ const offlinePack = await Mapbox.offlineManager.getPack();
```


### mergeOfflineRegions(path)
[Offline Example](../examples/Map/OfflineExample)### mergeOfflineRegions(path)

Sideloads offline db

Expand Down
6 changes: 3 additions & 3 deletions docs/ShapeSource.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ string
```
An HTTP(S) URL, absolute file URL, or local file URL relative to the current application’s resource bundle.


[Dynamic URL](../examples/Map/DynamicUrl)

### shape

Expand Down Expand Up @@ -163,7 +163,7 @@ if that layer has a higher z-index than another source layers
@return void
*signature:*`(event:OnPressEvent) => void`

[Custom Icon](../examples/SymbolCircleLayer/CustomIcon)
[Custom Icon](../examples/SymbolCircleLayer/CustomIcon), [Custom Icon Native Asset](../examples/SymbolCircleLayer/CustomIconNativeAsset)

### hitbox

Expand Down Expand Up @@ -252,4 +252,4 @@ const collection = await shapeSource.getClusterChildren(clusterId);
| `event` | `NativeSyntheticEvent` | `Yes` | undefined |


[Custom Icon](../examples/SymbolCircleLayer/CustomIcon)
[Custom Icon](../examples/SymbolCircleLayer/CustomIcon), [Custom Icon Native Asset](../examples/SymbolCircleLayer/CustomIconNativeAsset)
2 changes: 1 addition & 1 deletion docs/Style.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ MapboxJSON | URL
_required_
A JSON object conforming to the schema described in the Mapbox Style Specification , or a URL to such JSON.


[Style JSON](../examples/Map/StyleJson)



Expand Down
2 changes: 1 addition & 1 deletion docs/UserLocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func
Callback that is triggered on location icon press
*signature:*`() => void`


[Show Map](../examples/Map/ShowMap)

### onUpdate

Expand Down
Loading

0 comments on commit bf712e4

Please sign in to comment.