-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7ed017
commit 163e583
Showing
6 changed files
with
100 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
Comparsion of various annotations available in MapLibre React Native: | ||
# Annotations | ||
|
||
|*Feature* | *SymbolLayer* |*PointAnnotation* |*MarkerView* |*CircleLayer* | | ||
|-----------------------|--------------------|--------------------------------------|-------------------------|---------------------| | ||
|Can use images | ✓ | | | | | ||
|RN Views as childern | iOS: static |iOS: interactive <br/> android: static|interactive | | | ||
|Interactions | click |iOS: full <br/> android: click & drag & callout | supports full interactivity in the sense that inside MarkerViews one can place any RN View, which can be interacted with. Not to be misunderstood with drag n drop interactivity. | click | | ||
|Control Z-index | ✓ |iOS: always on top, android: n/a |always on top | ✓ | | ||
|Clustering | ✓ | | | ✓ | | ||
|Style with expressions | ✓ | | | ✓ | | ||
|iOS implementation | [MLNSymbolStyleLayer](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MLNSymbolStyleLayer.html) |[MLNAnnotationView](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MLNAnnotationView.html) |[MLNAnnotationView](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MLNAnnotationView.html) |[MLNCircleStyleLayer](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MLNCircleStyleLayer.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)| | ||
Comparison of various annotations available in MapLibre React Native: | ||
|
||
| Feature | `SymbolLayer` | `PointAnnotation` | `MarkerView` | `CircleLayer` | | ||
| ---------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | | ||
| Can use images | ✓ | | | | | ||
| RN Views as childern | iOS: static | iOS: interactive <br/> android: static | interactive | | | ||
| Interactions | click | iOS: full <br/> android: click & drag & callout | supports full interactivity in the sense that inside MarkerViews one can place any RN View, which can be interacted with. Not to be misunderstood with drag n drop interactivity. | click | | ||
| Control Z-index | ✓ | iOS: always on top, android: n/a | always on top | ✓ | | ||
| Clustering | ✓ | | | ✓ | | ||
| Style with expressions | ✓ | | | ✓ | | ||
| iOS implementation | [MLNSymbolStyleLayer](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MLNSymbolStyleLayer.html) | [MLNAnnotationView](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MLNAnnotationView.html) | [MLNAnnotationView](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MLNAnnotationView.html) | [MLNCircleStyleLayer](https://maplibre.org/maplibre-gl-native/ios/api/Classes/MLNCircleStyleLayer.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) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
## Logger | ||
### | ||
# Logger | ||
|
||
### methods | ||
#### setLogLevel(LogLevel) | ||
## Methods | ||
|
||
##### arguments | ||
| Name | Type | Required | Description | | ||
| ---- | :--: | :------: | :----------: | | ||
| `LogLevel` | `String` | `Yes` | required level of logging, can be `"error" | "warning" | "info" | "debug" | "verbose"` | | ||
### `setLogLevel(LogLevel)` | ||
|
||
##### Description | ||
sets the amount of logging | ||
Sets the amount of logging. | ||
|
||
#### setLogCallback(LogCallback) | ||
#### Arguments | ||
|
||
##### arguments | ||
| Name | Type | Required | Description | | ||
| ---- | :--: | :------: | :----------: | | ||
| `LogCallback` | `function` | `Yes` | callback taking a log object `{ message: String, level: LogLevel, tag: String }` as param. If callback return falsy value then default logging will take place. | | ||
| Name | Type | Required | Description | | ||
| ---------- | :------: | :------: | :----------------------------------------: | --------- | ------ | ------- | ---------- | | ||
| `LogLevel` | `String` | `Yes` | required level of logging, can be `"error" | "warning" | "info" | "debug" | "verbose"` | | ||
|
||
##### Description | ||
overwrite logging - good to mute specific errors/ warnings | ||
### `setLogCallback(LogCallback)` | ||
|
||
Overwrite logging, possibility to mute specific errors/warnings. | ||
|
||
#### Arguments | ||
|
||
| Name | Type | Required | Description | | ||
| ------------- | :--------: | :------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------: | | ||
| `LogCallback` | `function` | `Yes` | callback taking a log object `{ message: String, level: LogLevel, tag: String }` as param. If callback return falsy value then default logging will take place. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,59 @@ | ||
## MapLibreGL | ||
### | ||
# MapLibreGL | ||
|
||
### methods | ||
#### setAccessToken(accessToken) | ||
## Methods | ||
|
||
##### arguments | ||
| Name | Type | Required | Description | | ||
| ---- | :--: | :------: | :----------: | | ||
| `accessToken` | `String` | `Yes` | access token to pull Mapbox-hosted tiles; can be `null` for other tile hosts | | ||
### `setAccessToken(accessToken)` | ||
|
||
##### Description | ||
sets the accessToken, which is required when you want to use mapbox tiles | ||
not required when using other tiles | ||
|
||
#### getAccessToken() | ||
#### Arguments | ||
|
||
##### arguments | ||
| Name | Type | Required | Description | | ||
| ---- | :--: | :------: | :----------: | | ||
| `accessToken` | `String` | `Yes` | access token to pull Mapbox-hosted tiles; can be `null` if for other tile hosts | | ||
| Name | Type | Required | Description | | ||
| ------------- | :------: | :------: | :--------------------------------------------------------------------------: | | ||
| `accessToken` | `String` | `Yes` | access token to pull Mapbox-hosted tiles; can be `null` for other tile hosts | | ||
|
||
### `getAccessToken()` | ||
|
||
##### Description | ||
gets the accessToken | ||
|
||
#### Arguments | ||
|
||
| Name | Type | Required | Description | | ||
| ------------- | :------: | :------: | :-----------------------------------------------------------------------------: | | ||
| `accessToken` | `String` | `Yes` | access token to pull Mapbox-hosted tiles; can be `null` if for other tile hosts | | ||
|
||
#### addCustomHeader(headerName, headerValue) | ||
### `addCustomHeader(headerName, headerValue)` | ||
|
||
##### arguments | ||
| Name | Type | Required | Description | | ||
| ---- | :--: | :------: | :----------: | | ||
| `headerName` | `String` | `Yes` | name for customHeader | | ||
| `headerValue` | `String` | `Yes` | value for customHeader | | ||
#### Arguments | ||
|
||
##### Description | ||
also see [CustomHttpHeaders](/docs/guides/CustomHttpHeaders.md) | ||
also see [Custom HTTP Headers](/docs/guides/CustomHTTPHeaders.md) | ||
|
||
| Name | Type | Required | Description | | ||
| ------------- | :------: | :------: | :--------------------: | | ||
| `headerName` | `String` | `Yes` | name for customHeader | | ||
| `headerValue` | `String` | `Yes` | value for customHeader | | ||
|
||
#### removeCustomHeader(headerName) | ||
### `removeCustomHeader(headerName)` | ||
|
||
##### arguments | ||
| Name | Type | Required | Description | | ||
| ---- | :--: | :------: | :----------: | | ||
| `headerName` | `String` | `Yes` | name of customHeader to be removed | | ||
Also see [Custom HTTP Headers](/docs/guides/CustomHTTPHeaders.md) | ||
|
||
##### Description | ||
also see [CustomHttpHeaders](/docs/guides/CustomHttpHeaders.md) | ||
#### Arguments | ||
|
||
| Name | Type | Required | Description | | ||
| ------------ | :------: | :------: | :--------------------------------: | | ||
| `headerName` | `String` | `Yes` | name of customHeader to be removed | | ||
|
||
### Android only | ||
#### requestAndroidLocationPermissions() | ||
##### Description | ||
Opens Android Location Permission prompt. | ||
Returns a Promise which resolves into a boolean. | ||
Either permission was granted or denied. | ||
### `requestAndroidLocationPermissions()` | ||
|
||
Android only, opens Location Permission prompt. Returns a Promise which resolves into a boolean. Either permission was granted or denied. | ||
|
||
#### setConnected(connected) | ||
##### arguments | ||
| Name | Type | Required | Description | | ||
| ---- | :--: | :------: | :----------: | | ||
| `connected` | `Boolean` | `Yes` | whether or not the SDK should assume it is online | | ||
### `setConnected(connected)` | ||
|
||
#### Description | ||
If you want to fully block map tile requests over the network, such as for a low-data / offline application. | ||
|
||
#### arguments | ||
|
||
| Name | Type | Required | Description | | ||
| ----------- | :-------: | :------: | :-----------------------------------------------: | | ||
| `connected` | `Boolean` | `Yes` | whether or not the SDK should assume it is online | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters