Skip to content

Commit

Permalink
Merge pull request #65 from vietmap-company/updateDocument
Browse files Browse the repository at this point in the history
[feat(doc)]: Update SDK document
  • Loading branch information
thanhdt-vietmap authored Feb 22, 2024
2 parents 2aeda08 + 037642e commit c23411e
Show file tree
Hide file tree
Showing 35 changed files with 93 additions and 107 deletions.
4 changes: 2 additions & 2 deletions docs/Annotation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from Annotation.js do not modify -->
## <MapLibreGL.Annotation />
## <Vietmap.Annotation />
###

### props
Expand All @@ -12,7 +12,7 @@
| children | `ReactElement \| ReactElement[]` | `none` | `false` | FIX ME NO DESCRIPTION |
| style | `object` | `none` | `false` | FIX ME NO DESCRIPTION |
| icon | `string \| number \| object` | `none` | `false` | FIX ME NO DESCRIPTION |
| animationEasingFunction | `FIX ME UNKNOWN TYPE` | `Easing.linear` | `false` | FIX ME NO DESCRIPTION |
| animationEasingFunction | `EasingFunction = (value: number)` | `Easing.linear` | `false` | FIX ME NO DESCRIPTION |

### methods
#### onPress(event)
Expand Down
4 changes: 1 addition & 3 deletions docs/Annotations.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Comparsion of various annotations available in MapLibre React Native:
Comparsion of various annotations available in Vietmap React Native:

|*Feature* | *SymbolLayer* |*PointAnnotation* |*MarkerView* |*CircleLayer* |
|-----------------------|--------------------|--------------------------------------|-------------------------|---------------------|
Expand All @@ -8,5 +8,3 @@ Comparsion of various annotations available in MapLibre React Native:
|Control Z-index | &check; |iOS: always on top, android: n/a |always on top | &check; |
|Clustering | &check; | | | &check; |
|Style with expressions | &check; | | | &check; |
|iOS implementation | [MGLSymbolStyleLayer](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MGLSymbolStyleLayer.html) |[MGLAnnotationView](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MGLAnnotationView.html) |[MGLAnnotationView](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MGLAnnotationView.html) |[MGLCircleStyleLayer](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MGLCircleStyleLayer.html) |
|android implementation | [SymbolLayer](https://maplibre.org/maplibre-gl-native/android/api/com/mapbox/mapboxsdk/style/layers/SymbolLayer.html)|[annotation.Symbol](https://docs.mapbox.com/android/api/plugins/annotation/0.8.0/com/mapbox/mapboxsdk/plugins/annotation/Symbol.html)|[annotation.Marker](https://docs.mapbox.com/android/api/plugins/markerview/0.4.0/com/mapbox/mapboxsdk/plugins/markerview/MarkerView.html) |[CircleLayer](https://maplibre.org/maplibre-gl-native/android/api/com/mapbox/mapboxsdk/style/layers/CircleLayer.html)|
2 changes: 1 addition & 1 deletion docs/BackgroundLayer.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from BackgroundLayer.js do not modify -->
## <MapLibreGL.BackgroundLayer />
## <Vietmap.BackgroundLayer />
###

### props
Expand Down
2 changes: 1 addition & 1 deletion docs/Callout.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from Callout.js do not modify -->
## <MapLibreGL.Callout />
## <Vietmap.Callout />
### Callout that displays information about a selected annotation near the annotation.

### props
Expand Down
4 changes: 2 additions & 2 deletions docs/Camera.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!-- This file was autogenerated from Camera.js do not modify -->
## <MapLibreGL.Camera />
## <Vietmap.Camera />
###

### props
| Prop | Type | Default | Required | Description |
| ---- | :--: | :-----: | :------: | :----------: |
| centerCoordinate | `GeoJSON.Position` | `none` | `false` | The location on which the map should center. |
| centerCoordinate | `GeoJSON.Position` | `none` | `false` | The location on which the map should center. <br/>Input with [lng, lat] format. |
| bounds | `CameraBoundsWithPadding` | `none` | `false` | The corners of a box around which the map should bound. Contains padding props for backwards<br/>compatibility; the root `padding` prop should be used instead. |
| heading | `number` | `none` | `false` | The heading (orientation) of the map. |
| pitch | `number` | `none` | `false` | The pitch of the map. |
Expand Down
4 changes: 2 additions & 2 deletions docs/CircleLayer.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!-- This file was autogenerated from CircleLayer.js do not modify -->
## <VietmapGL.CircleLayer />
## <Vietmap.CircleLayer />
### CircleLayer is a style layer that renders one or more filled circles on the map.

### props
| Prop | Type | Default | Required | Description |
| ---- | :--: | :-----: | :------: | :----------: |
| style | `CircleLayerStyleProps` | `none` | `false` | Customizable style attributes |
| sourceID | `FIX ME UNKNOWN TYPE` | `VietmapGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |
| sourceID | `FIX ME UNKNOWN TYPE` | `Vietmap.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |


### styles
Expand Down
10 changes: 5 additions & 5 deletions docs/CustomHttpHeaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,29 +54,29 @@ You can add and remove headers at runtime.
#### To add a header
```javascript
MapLibreGL.addCustomHeader('Authorization', '{auth header}');
Vietmap.addCustomHeader('Authorization', '{auth header}');
```

#### To remove a header

```javascript
MapLibreGL.removeCustomHeader('Authorization');
Vietmap.removeCustomHeader('Authorization');
```

#### Working example

```javascript
export default class HelloWorldApp extends Component {
componentDidMount () {
MapLibreGL.addCustomHeader('Authorization', '{auth header}');
Vietmap.addCustomHeader('Authorization', '{auth header}');
}

render () {
MapLibreGL.addCustomHeader('X-Some-Header', 'my-value');
Vietmap.addCustomHeader('X-Some-Header', 'my-value');
return (
<View style={styles.page}>
<View style={styles.container}>
<MapLibreGL.MapView
<Vietmap.MapView
style={styles.map}
styleURL={STYLE_URL}/>
</View>
Expand Down
4 changes: 2 additions & 2 deletions docs/FillExtrusionLayer.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!-- This file was autogenerated from FillExtrusionLayer.js do not modify -->
## <VietmapGL.FillExtrusionLayer />
## <Vietmap.FillExtrusionLayer />
### FillExtrusionLayer is a style layer that renders one or more 3D extruded polygons on the map.

### props
| Prop | Type | Default | Required | Description |
| ---- | :--: | :-----: | :------: | :----------: |
| style | `FillExtrusionLayerStyleProps` | `none` | `false` | Customizable style attributes |
| sourceID | `FIX ME UNKNOWN TYPE` | `VietmapGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |
| sourceID | `FIX ME UNKNOWN TYPE` | `Vietmap.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |


### styles
Expand Down
4 changes: 2 additions & 2 deletions docs/FillLayer.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!-- This file was autogenerated from FillLayer.js do not modify -->
## <VietmapGL.FillLayer />
## <Vietmap.FillLayer />
### FillLayer is a style layer that renders one or more filled (and optionally stroked) polygons on the map.

### props
| Prop | Type | Default | Required | Description |
| ---- | :--: | :-----: | :------: | :----------: |
| style | `FillLayerStyleProps` | `none` | `false` | Customizable style attributes |
| sourceID | `FIX ME UNKNOWN TYPE` | `VietmapGL.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |
| sourceID | `FIX ME UNKNOWN TYPE` | `Vietmap.StyleSource.DefaultSourceID` | `false` | FIX ME NO DESCRIPTION |


### styles
Expand Down
2 changes: 1 addition & 1 deletion docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import Vietmap from '@maplibre/maplibre-react-native';

// Will be null for most users (only Vietmap authenticates this way).
// Required on Android. See Android installation notes.
MapLibreGL.setAccessToken(null);
Vietmap.setAccessToken(null);

const styles = StyleSheet.create({
page: {
Expand Down
2 changes: 1 addition & 1 deletion docs/HeadingIndicator.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from HeadingIndicator.js do not modify -->
## <MapLibreGL.HeadingIndicator />
## <Vietmap.HeadingIndicator />
###

### props
Expand Down
2 changes: 1 addition & 1 deletion docs/HeatmapLayer.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from HeatmapLayer.js do not modify -->
## <VietmapGL.HeatmapLayer />
## <Vietmap.HeatmapLayer />
### HeatmapLayer is a style layer that renders one or more filled circles on the map.

### props
Expand Down
2 changes: 1 addition & 1 deletion docs/ImageSource.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from ImageSource.js do not modify -->
## <MapLibreGL.ImageSource />
## <Vietmap.ImageSource />
### ImageSource is a content source that is used for a georeferenced raster image to be shown on the map.<br/>The georeferenced image scales and rotates as the user zooms and rotates the map

### props
Expand Down
2 changes: 1 addition & 1 deletion docs/Images.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from Images.js do not modify -->
## <MapLibreGL.Images />
## <Vietmap.Images />
### Images defines the images used in Symbol etc layers

### props
Expand Down
2 changes: 1 addition & 1 deletion docs/Light.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from Light.js do not modify -->
## <VietmapGL.Light />
## <Vietmap.Light />
### Light represents the light source for extruded geometries

### props
Expand Down
2 changes: 1 addition & 1 deletion docs/LineLayer.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from LineLayer.js do not modify -->
## <VietmapGL.LineLayer />
## <Vietmap.LineLayer />
### LineLayer is a style layer that renders one or more stroked polylines on the map.

### props
Expand Down
2 changes: 1 addition & 1 deletion docs/MapView.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from MapView.js do not modify -->
## <VietmapGL.MapView />
## <Vietmap.MapView />
### MapView backed by Vietmap GL Native

### props
Expand Down
2 changes: 1 addition & 1 deletion docs/MarkerView.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from MarkerView.js do not modify -->
## <MapLibreGL.MarkerView />
## <Vietmap.MarkerView />
### MarkerView allows you to place a interactive react native marker to the map.<br/><br/>If you have static view consider using PointAnnotation or SymbolLayer they'll offer much better performance<br/>.<br/>This is based on [MakerView plugin](https://docs.mapbox.com/android/plugins/overview/markerview/) on Android<br/>and PointAnnotation on iOS.

### props
Expand Down
2 changes: 1 addition & 1 deletion docs/NativeUserLocation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from NativeUserLocation.js do not modify -->
## <MapLibreGL.NativeUserLocation />
## <Vietmap.NativeUserLocation />
###

### props
Expand Down
2 changes: 1 addition & 1 deletion docs/OfflineManager.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from offlineManager.js do not modify -->
## <MapLibreGL.offlineManager />
## <Vietmap.offlineManager />
### OfflineManager implements a singleton (shared object) that manages offline packs.<br/>All of this class’s instance methods are asynchronous, reflecting the fact that offline resources are stored in a database.<br/>The shared object maintains a canonical collection of offline packs.


Expand Down
2 changes: 1 addition & 1 deletion docs/PointAnnotation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from PointAnnotation.js do not modify -->
## <MapLibreGL.PointAnnotation />
## <Vietmap.PointAnnotation />
### PointAnnotation represents a one-dimensional shape located at a single geographical coordinate.<br/><br/>Consider using ShapeSource and SymbolLayer instead, if you have many points and you have static images,<br/>they'll offer much better performance<br/><br/>.<br/>If you need interctive views please use MarkerView,<br/>as with PointAnnotation on Android child views are rendered onto a bitmap for better performance.

### props
Expand Down
2 changes: 1 addition & 1 deletion docs/RasterLayer.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from RasterLayer.js do not modify -->
## <VietmapGL.RasterLayer />
## <Vietmap.RasterLayer />
###

### props
Expand Down
2 changes: 1 addition & 1 deletion docs/RasterSource.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from RasterSource.js do not modify -->
## <MapLibreGL.RasterSource />
## <Vietmap.RasterSource />
### RasterSource is a map content source that supplies raster image tiles to be shown on the map.<br/>The location of and metadata about the tiles are defined either by an option dictionary<br/>or by an external file that conforms to the TileJSON specification.

### props
Expand Down
2 changes: 1 addition & 1 deletion docs/ShapeSource.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from ShapeSource.js do not modify -->
## <MapLibreGL.ShapeSource />
## <Vietmap.ShapeSource />
### ShapeSource is a map content source that supplies vector shapes to be shown on the map.<br/>The shape may be a url or a GeoJSON object

### props
Expand Down
2 changes: 1 addition & 1 deletion docs/Style.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- This file was autogenerated from Style.js do not modify -->
## <VietmapGL.Style />
## <Vietmap.Style />
### Style is a component that automatically adds sources / layers to the map using Vietmap Style Spec.<br/>Only [`sources`](https://maplibre.org/maplibre-gl-js-docs/style-spec/sources/) & [`layers`](https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/) are supported.<br/>Other fields such as `sprites`, `glyphs` etc. will be ignored. Not all layer / source attributes from the style spec are supported, in general the supported attributes will be mentioned under https://github.com/maplibre/maplibre-react-native/tree/main/docs.<br/><br/>TODO: Maintainer forking this project does not understand the above comment regarding what is supported.

### props
Expand Down
Loading

0 comments on commit c23411e

Please sign in to comment.