Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rnmapbox/maps
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v10.1.23
Choose a base ref
...
head repository: rnmapbox/maps
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on May 12, 2024

  1. Copy the full SHA
    18bc6d8 View commit details
  2. feat(web): MarkerView POC (#3486)

    * Implemented web MarkerView poc
    
    * feat(web): added web example for marker view
    
    ---------
    
    Co-authored-by: Volker Lieber <42102008+VolkerLieber@users.noreply.github.com>
    mfazekas and VolkerLieber authored May 12, 2024
    Copy the full SHA
    460110a View commit details
  3. Copy the full SHA
    a83c7f2 View commit details

Commits on May 13, 2024

  1. Improved web Camera (#3473)

    Implemented all methods of CameraRef except SetCamera and implemented zoom CameraProps
    VolkerLieber authored May 13, 2024
    Copy the full SHA
    7f99408 View commit details

Commits on May 15, 2024

  1. 10.1.24

    RNMapbox robot committed May 15, 2024
    Copy the full SHA
    1a6d096 View commit details

Commits on May 22, 2024

  1. Copy the full SHA
    7806111 View commit details

Commits on Jun 5, 2024

  1. Remove AbortController test mock (#3506)

    This library includes an `AbortController` test mock, which doesn't work
    in places that expect a real one. For example, I was writing an
    unrelated test that tried to cancel a `fetch()` which failed because
    the `AbortController`'s `signal` property was invalid.
    
    Because [`AbortController` is in all supported Node versions][0], we can
    safely remove this mock and rely on the real thing.
    
    This should only affect tests.
    
    [0]: https://developer.mozilla.org/en-US/docs/Web/API/AbortController#browser_compatibility
    EvanHahn authored Jun 5, 2024
    Copy the full SHA
    5b6489e View commit details

Commits on Jun 11, 2024

  1. Copy the full SHA
    69f4d17 View commit details
  2. Copy the full SHA
    9c420bc View commit details
  3. 10.1.25

    RNMapbox robot committed Jun 11, 2024
    Copy the full SHA
    e6fd069 View commit details

Commits on Jun 13, 2024

  1. Copy the full SHA
    6af54d3 View commit details
  2. Copy the full SHA
    1c7c460 View commit details
  3. Copy the full SHA
    34db17e View commit details

Commits on Jun 14, 2024

  1. Copy the full SHA
    7d72add View commit details
  2. 10.1.26

    RNMapbox robot committed Jun 14, 2024
    Copy the full SHA
    0bcf8bb View commit details
  3. Copy the full SHA
    c05b9a2 View commit details
  4. fix(ios,newarch): implement missing RNMBXLocationModule instance meth…

    …ods, disable bridgeless on example (#3529)
    mfazekas authored Jun 14, 2024
    Copy the full SHA
    9f39dcc View commit details
  5. 10.1.27

    RNMapbox robot committed Jun 14, 2024
    Copy the full SHA
    c781f7c View commit details

Commits on Jun 15, 2024

  1. chore(web): ci for web build (#3501)

    * chore(web): ci for web build
    
    * chore(web): fix metro resolution to use index.web.js instead of index when resolving the js version of @rnmapbox/maps, this should fix
    mfazekas authored Jun 15, 2024
    Copy the full SHA
    737fc6d View commit details
  2. fix output dir (#3533)

    mfazekas authored Jun 15, 2024
    Copy the full SHA
    720ac0f View commit details
  3. Copy the full SHA
    10c4274 View commit details

Commits on Jun 16, 2024

  1. Copy the full SHA
    32b7ce4 View commit details

Commits on Jun 18, 2024

  1. Fix issues with rn 0.74 bridgeless (#3535)

    * Fix empty native module
    
    * Fix onPress type
    janicduplessis authored Jun 18, 2024
    Copy the full SHA
    b74fc6f View commit details

Commits on Jun 26, 2024

  1. Copy the full SHA
    bdb97cb View commit details

Commits on Jun 29, 2024

  1. Copy the full SHA
    55216db View commit details
  2. Fix error in clusterMaxZoomLevel on new arch (#3541)

    * Fix error in clusterMaxZoomLevel on new arch
    
    * Use macro to convert props in RNMBXShapeSourceComponentView
    
    * Format
    janicduplessis authored Jun 29, 2024
    Copy the full SHA
    dbe96aa View commit details
  3. refactor!:use LocationPuck instead of deprecated NativeUserLocation (#…

    …3497)
    
    * refactor!:use LocationPuck instead of deprecated NativeUserLocation
    
    Follow-up for #3222
    
    * refactor!:use LocationPuck instead of deprecated NativeUserLocation
    chuchuva authored Jun 29, 2024
    Copy the full SHA
    485dca8 View commit details

Commits on Jul 3, 2024

  1. Copy the full SHA
    0c37ee8 View commit details

Commits on Jul 13, 2024

  1. Copy the full SHA
    523479c View commit details
  2. 10.1.28

    RNMapbox robot committed Jul 13, 2024
    Copy the full SHA
    25784b6 View commit details

Commits on Aug 10, 2024

  1. doc: remove gitter and and discord and github discussions (#3585)

    * doc: remove gitter and and discord and github discussions
    
    * chore: added missing modules for autogenerate
    mfazekas authored Aug 10, 2024
    Copy the full SHA
    554a24f View commit details
  2. Copy the full SHA
    22155a1 View commit details
  3. Copy the full SHA
    cdce1cd View commit details
  4. Copy the full SHA
    7f702dc View commit details
  5. 10.1.29-rc.0

    RNMapbox robot committed Aug 10, 2024
    Copy the full SHA
    e51e63f View commit details

Commits on Aug 20, 2024

  1. 10.1.29

    RNMapbox robot committed Aug 20, 2024
    Copy the full SHA
    bc01a0b View commit details
  2. chore: ugprade example to rn 0.75.1 (#3565)

    * chore: ugprade example to rn 7.5.0-rc3
    
    * rn-0.75.1
    mfazekas authored Aug 20, 2024
    Copy the full SHA
    e5b1ca5 View commit details

Commits on Aug 23, 2024

  1. Copy the full SHA
    34d1c72 View commit details
  2. 10.1.30-rc.0

    RNMapbox robot committed Aug 23, 2024
    Copy the full SHA
    193baf6 View commit details

Commits on Aug 25, 2024

  1. 10.1.30

    RNMapbox robot committed Aug 25, 2024
    Copy the full SHA
    465d341 View commit details

Commits on Aug 27, 2024

  1. [android][v10] Add guard to prevent NRE on map.getStyle().styleLayers (

    …#3595)
    
    * Add guard to prevent NRE crashing android apps on launch of map without styleLayers being a valid array
    
    * Update android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt
    
    Use early return instead of optional chaining an iterator.
    
    Co-authored-by: Miklós Fazekas <mfazekas@szemafor.com>
    
    ---------
    
    Co-authored-by: Frederick Engelhardt <fre@vllc.dev>
    Co-authored-by: Miklós Fazekas <mfazekas@szemafor.com>
    3 people authored Aug 27, 2024
    Copy the full SHA
    b96cdb9 View commit details

Commits on Sep 1, 2024

  1. Copy the full SHA
    fef7157 View commit details
  2. 10.1.31-rc.0

    RNMapbox robot committed Sep 1, 2024
    Copy the full SHA
    7e04fb4 View commit details

Commits on Sep 5, 2024

  1. Copy the full SHA
    b1e4335 View commit details
  2. 10.1.31-rc.1

    RNMapbox robot committed Sep 5, 2024
    Copy the full SHA
    21de76b View commit details

Commits on Sep 9, 2024

  1. 10.1.31

    RNMapbox robot committed Sep 9, 2024
    Copy the full SHA
    127b699 View commit details

Commits on Sep 19, 2024

  1. Copy the full SHA
    0def7d3 View commit details
  2. feat(ios): enable setSourceVisibility for Mapbox 11 (#3616)

    * feat(ios): enable setSourceVisibility for Mapbox 11
    
    * docs: fix CONTRIBUTING file path typo
    
    * fix: incomplete sourceDetails type in Mapbox 10 compile case
    bvanderdrift authored Sep 19, 2024
    Copy the full SHA
    96552bc View commit details

Commits on Oct 13, 2024

  1. Copy the full SHA
    c05ecad View commit details
  2. Copy the full SHA
    2980630 View commit details
Showing with 15,671 additions and 1,014 deletions.
  1. +1 −1 .eslintrc.js
  2. +1 −1 .github/pull_request_template.md
  3. +14 −1 .github/workflows/ci-requiring-tokens.yml
  4. +9 −0 .github/workflows/update-docs.yml
  5. +59 −0 .github/workflows/web-actions.yml
  6. +1 −1 .gitignore
  7. +9 −3 CONTRIBUTING.md
  8. +1 −1 README.md
  9. +11 −6 android/build.gradle
  10. +2 −2 android/install.md
  11. +3 −3 android/src/main/java/com/rnmapbox/rnmbx/components/AbstractEventEmitter.kt
  12. +1 −1 android/src/main/java/com/rnmapbox/rnmbx/components/annotation/RNMBXPointAnnotationManager.kt
  13. +23 −22 android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCamera.kt
  14. +2 −1 android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXCameraManager.kt
  15. +1 −1 android/src/main/java/com/rnmapbox/rnmbx/components/camera/RNMBXVIewportManager.kt
  16. +7 −18 android/src/main/java/com/rnmapbox/rnmbx/components/images/RNMBXImagesManager.kt
  17. +2 −0 android/src/main/java/com/rnmapbox/rnmbx/components/location/RNMBXCustomLocationProviderManager.kt
  18. +1 −0 android/src/main/java/com/rnmapbox/rnmbx/components/location/RNMBXNativeUserLocationManager.kt
  19. +4 −4 android/src/main/java/com/rnmapbox/rnmbx/components/mapview/NativeMapViewModule.kt
  20. +9 −2 android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapView.kt
  21. +14 −14 android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapViewManager.kt
  22. +1 −0 android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleImportManager.kt
  23. +1 −0 android/src/main/java/com/rnmapbox/rnmbx/components/styles/RNMBXStyleValue.kt
  24. +3 −1 android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/RNMBXLayer.kt
  25. +2 −1 android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXImageSource.kt
  26. +1 −1 android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterDemSourceManager.kt
  27. +5 −1 android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSource.kt
  28. +38 −3 android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXRasterSourceManager.kt
  29. +2 −2 android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXShapeSourceModule.kt
  30. +5 −1 android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSource.kt
  31. +7 −7 android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXTileSourceManager.kt
  32. +1 −1 android/src/main/java/com/rnmapbox/rnmbx/components/styles/sources/RNMBXVectorSourceManager.kt
  33. +18 −16 android/src/main/java/com/rnmapbox/rnmbx/events/constants/EventKeys.kt
  34. +6 −1 android/src/main/java/com/rnmapbox/rnmbx/modules/RNMBXModule.kt
  35. +10 −3 android/src/main/java/com/rnmapbox/rnmbx/utils/ViewTagResolver.kt
  36. +1 −0 android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/Dynamic.kt
  37. +1 −0 android/src/main/java/com/rnmapbox/rnmbx/utils/extensions/ReadableMap.kt
  38. +3 −0 android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXRasterSourceManagerDelegate.java
  39. +1 −0 android/src/main/old-arch/com/facebook/react/viewmanagers/RNMBXRasterSourceManagerInterface.java
  40. +13 −13 android/src/main/old-arch/com/rnmapbox/rnmbx/NativeMapViewModuleSpec.java
  41. +1 −1 android/src/main/old-arch/com/rnmapbox/rnmbx/NativeRNMBXCameraModuleSpec.java
  42. +4 −4 ...oid/src/main/old-arch/com/rnmapbox/rnmbx/NativeRNMBXChangeLineOffsetsShapeAnimatorModuleSpec.java
  43. +1 −1 android/src/main/old-arch/com/rnmapbox/rnmbx/NativeRNMBXImageModuleSpec.java
  44. +2 −2 android/src/main/old-arch/com/rnmapbox/rnmbx/NativeRNMBXMovePointShapeAnimatorModuleSpec.java
  45. +1 −1 android/src/main/old-arch/com/rnmapbox/rnmbx/NativeRNMBXPointAnnotationModuleSpec.java
  46. +3 −3 android/src/main/old-arch/com/rnmapbox/rnmbx/NativeRNMBXShapeSourceModuleSpec.java
  47. +1 −1 android/src/main/old-arch/com/rnmapbox/rnmbx/NativeRNMBXTileStoreModuleSpec.java
  48. +3 −3 android/src/main/old-arch/com/rnmapbox/rnmbx/NativeRNMBXViewportModuleSpec.java
  49. +18 −0 android/src/main/rn-compat/rn75/com/rnmapbox/rnmbx/rncompat/Dynamic.kt
  50. +7 −0 android/src/main/rn-compat/rn75/com/rnmapbox/rnmbx/rncompat/ReadableMap.kt
  51. +1 −1 docs/Camera.md
  52. +11 −0 docs/RasterSource.md
  53. +1 −1 docs/UserLocation.md
  54. +8 −1 docs/docs.json
  55. +63 −1 docs/examples.json
  56. +3 −0 example/App.js
  57. +3 −2 example/Gemfile
  58. +11 −10 example/android/app/build.gradle
  59. +2 −1 example/android/app/src/main/AndroidManifest.xml
  60. +3 −2 example/android/app/src/main/java/com/rnmapboxglexample/MainApplication.kt
  61. +6 −6 example/android/build.gradle
  62. +0 −2 example/android/gradle.properties
  63. +1 −1 example/android/gradle/wrapper/gradle-wrapper.properties
  64. +4 −2 example/android/gradlew
  65. +2 −0 example/android/gradlew.bat
  66. +3 −1 example/android/settings.gradle
  67. +11 −2 example/app.json
  68. +22 −3 example/babel.config.js
  69. +5 −1 example/index.js
  70. +3 −3 example/ios/Podfile
  71. +1,081 −432 example/ios/Podfile.lock
  72. +15 −18 example/ios/RNMapboxGLExample.xcodeproj/project.pbxproj
  73. +5 −0 example/ios/RNMapboxGLExample/AppDelegate.mm
  74. +53 −5 example/metro.config.js
  75. +34 −29 example/package.json
  76. +6 −3 example/src/App.js
  77. +10 −0 example/src/examples/Animations/AnimatedLine.js
  78. +12 −0 example/src/examples/Animations/AnimatedLineOffsets.tsx
  79. +12 −0 example/src/examples/Animations/AnimatedPoint.tsx
  80. +10 −0 example/src/examples/Animations/DriveTheLine.js
  81. +8 −0 example/src/examples/Animations/index.js
  82. +17 −11 example/src/examples/Camera/Fit.js
  83. +23 −8 example/src/examples/Camera/FlyTo.js
  84. +17 −12 example/src/examples/Camera/GetCenter.js
  85. +13 −8 example/src/examples/Camera/GetZoom.js
  86. +4 −0 example/src/examples/FillRasterLayer/RasterSource.js
  87. +51 −0 example/src/examples/Map/MapUnMount.tsx
  88. +1 −0 example/src/examples/Map/index.js
  89. +30 −0 example/src/examples/Web/MarkerView.js
  90. +5 −0 example/src/examples/Web/index.js
  91. +5 −13 example/src/scenes/GroupAndItem.tsx
  92. +0 −1 example/tsconfig.json
  93. +0 −17 example/webpack.config.js
  94. +1 −1 ios/RNMBX/Extensions/Array+asExpressions.swift
  95. +6 −0 ios/RNMBX/RNMBXAtmosphereComponentView.mm
  96. +6 −0 ios/RNMBX/RNMBXBackgroundLayerComponentView.mm
  97. +6 −0 ios/RNMBX/RNMBXCalloutComponentView.mm
  98. +6 −0 ios/RNMBX/RNMBXCameraComponentView.mm
  99. +2 −1 ios/RNMBX/RNMBXCameraModule.mm
  100. +6 −0 ios/RNMBX/RNMBXCircleLayerComponentView.mm
  101. +6 −0 ios/RNMBX/RNMBXCustomLocationProviderComponentView.mm
  102. +11 −3 ios/RNMBX/RNMBXFabricPropConvert.h
  103. +21 −1 ios/RNMBX/RNMBXFabricPropConvert.mm
  104. +6 −0 ios/RNMBX/RNMBXFillExtrusionLayerComponentView.mm
  105. +6 −0 ios/RNMBX/RNMBXFillLayerComponentView.mm
  106. +6 −0 ios/RNMBX/RNMBXHeatmapLayerComponentView.mm
  107. +5 −0 ios/RNMBX/RNMBXImageComponentView.mm
  108. +6 −0 ios/RNMBX/RNMBXImageSourceComponentView.mm
  109. +6 −0 ios/RNMBX/RNMBXImagesComponentView.mm
  110. +37 −37 ios/RNMBX/RNMBXLayer.swift
  111. +6 −0 ios/RNMBX/RNMBXLightComponentView.mm
  112. +6 −0 ios/RNMBX/RNMBXLineLayerComponentView.mm
  113. +1 −1 ios/RNMBX/RNMBXLocationModule.swift
  114. +9 −1 ios/RNMBX/RNMBXLocationModuleV11.swift
  115. +100 −31 ios/RNMBX/RNMBXMapView.swift
  116. +16 −37 ios/RNMBX/RNMBXMapViewComponentView.mm
  117. +5 −2 ios/RNMBX/RNMBXMapViewManager.swift
  118. +1 −1 ios/RNMBX/RNMBXMapViewModule.mm
  119. +1 −0 ios/RNMBX/RNMBXMarkerView.swift
  120. +6 −0 ios/RNMBX/RNMBXMarkerViewComponentView.mm
  121. +6 −0 ios/RNMBX/RNMBXMarkerViewContentComponentView.mm
  122. +6 −0 ios/RNMBX/RNMBXModelLayerComponentView.mm
  123. +6 −0 ios/RNMBX/RNMBXModelsComponentView.mm
  124. +6 −0 ios/RNMBX/RNMBXNativeUserLocationComponentView.mm
  125. +6 −0 ios/RNMBX/RNMBXPointAnnotationComponentView.mm
  126. +2 −2 ios/RNMBX/RNMBXRasterDemSource.swift
  127. +5 −0 ios/RNMBX/RNMBXRasterDemSourceComponentView.mm
  128. +6 −0 ios/RNMBX/RNMBXRasterLayerComponentView.mm
  129. +16 −10 ios/RNMBX/RNMBXRasterSource.swift
  130. +11 −2 ios/RNMBX/RNMBXRasterSourceComponentView.mm
  131. +1 −1 ios/RNMBX/RNMBXRasterSourceViewManager.m
  132. +23 −53 ios/RNMBX/RNMBXShapeSourceComponentView.mm
  133. +6 −0 ios/RNMBX/RNMBXSkyLayerComponentView.mm
  134. +6 −0 ios/RNMBX/RNMBXStyleImportComponentView.mm
  135. +50 −50 ios/RNMBX/RNMBXStyleValue.swift
  136. +6 −0 ios/RNMBX/RNMBXSymbolLayerComponentView.mm
  137. +6 −0 ios/RNMBX/RNMBXTerrainComponentView.mm
  138. +5 −0 ios/RNMBX/RNMBXVectorSourceComponentView.mm
  139. +6 −0 ios/RNMBX/RNMBXViewportComponentView.mm
  140. +1 −1 ios/install.md
  141. +9 −2 package.json
  142. +2 −2 plugin/install.md
  143. +3 −3 rnmapbox-maps.podspec
  144. +0 −6 setup-jest.js
  145. +2 −1 src/RNMBXModule.ts
  146. +6 −0 src/components/RasterSource.tsx
  147. +3 −3 src/components/UserLocation.tsx
  148. +2 −1 src/specs/RNMBXMapViewNativeComponent.ts
  149. +1 −0 src/specs/RNMBXRasterSourceNativeComponent.ts
  150. +1 −1 src/types/Position.ts
  151. +183 −13 src/web/components/Camera.tsx
  152. +77 −0 src/web/components/MarkerView.tsx
  153. +5 −1 src/web/index.js
  154. +12,993 −0 yarn.lock
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ module.exports = {
'react-native/no-inline-styles': 0,
'@typescript-eslint/no-explicit-any': ['error', { ignoreRestArgs: true }],
},
ignorePatterns: ['**/rnmapbox.web.symlink', 'plugin/build/'],
ignorePatterns: ['**/rnmapbox.web.symlink', 'plugin/build/', 'example/dist'],
overrides: [
{
// Match TypeScript Files
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ Added `your feature` that allows ...

<!-- If it's a visual PR, we appreciate a screenshot or video -->

## Component to reprocuce the issue you're fixing
## Component to reproduce the issue you're fixing

<!-- If you're fixing an issue and the component you've used to repro the issue is not already on the issue you're fixing, add that here -->
```jsx
15 changes: 14 additions & 1 deletion .github/workflows/ci-requiring-tokens.yml
Original file line number Diff line number Diff line change
@@ -113,4 +113,17 @@ jobs:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
MAPBOX_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_DOWNLOAD_TOKEN }}
ENV_MAPBOX_ACCESS_TOKEN: ${{ secrets.ENV_MAPBOX_ACCESS_TOKEN }}
ENV_MAPBOX_DOWNLOAD_TOKEN: ${{ secrets.ENV_MAPBOX_DOWNLOAD_TOKEN }}
ENV_MAPBOX_DOWNLOAD_TOKEN: ${{ secrets.ENV_MAPBOX_DOWNLOAD_TOKEN }}

call_web_workflow:
name: "Web/Mapbox"
uses: ./.github/workflows/web-actions.yml
with:
env_name: ${{ inputs.env_name }}
ref: ${{ inputs.ref }}
NVMRC: ${{ inputs.NVMRC }}
secrets:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
MAPBOX_DOWNLOAD_TOKEN: ${{ secrets.MAPBOX_DOWNLOAD_TOKEN }}
ENV_MAPBOX_ACCESS_TOKEN: ${{ secrets.ENV_MAPBOX_ACCESS_TOKEN }}
ENV_MAPBOX_DOWNLOAD_TOKEN: ${{ secrets.ENV_MAPBOX_DOWNLOAD_TOKEN }}
9 changes: 9 additions & 0 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
@@ -41,6 +41,15 @@ jobs:
run: node scripts/doc-generate.mjs
- name: Generate example docs into maps-docs repo
run: bun scripts/example-docs.ts
- name: Generate example app into maps-docs repo
run: |
cd example
echo $MAPBOX_WEB_ACCESS_TOKEN > accesstoken
yarn install
npx expo export -p web --output-dir ../../maps-docs/static/example-app
working-directory: maps
env:
MAPBOX_WEB_ACCESS_TOKEN: ${{ secrets.MAPBOX_WEB_ACCESS_TOKEN }}
- name: Setup deploy key for github deploy
uses: webfactory/ssh-agent@v0.5.0
with:
59 changes: 59 additions & 0 deletions .github/workflows/web-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Web Build

on:
workflow_call:
inputs:
env_name:
required: true
default: default
type: string
ref:
required: false
type: string
NVMRC:
required: true
type: string
secrets:
MAPBOX_ACCESS_TOKEN:
required: true
MAPBOX_DOWNLOAD_TOKEN:
required: true
ENV_MAPBOX_ACCESS_TOKEN:
required: false
ENV_MAPBOX_DOWNLOAD_TOKEN:
required: false

jobs:
build_example:
name: Example Build for Web
runs-on: ubuntu-latest
environment: ${{ inputs.env_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
if: ${{ inputs.ref == '' }}

- name: Checkout fork
uses: actions/checkout@v4
if: ${{ inputs.ref != '' }}
with:
ref: ${{ inputs.ref }}

- name: Setup node ${{ inputs.NVMRC }}
uses: actions/setup-node@v3.5.1
with:
node-version: ${{ inputs.NVMRC }}

- run: echo $MAPBOX_ACCESS_TOKEN > ./accesstoken
working-directory: example
env:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN || secrets.ENV_MAPBOX_ACCESS_TOKEN }}

- run: yarn install --network-timeout 1000000
working-directory: example

- run: yarn postinstall
working-directory: example

- run: npx expo export --platform web
working-directory: example
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -55,11 +55,11 @@ node_modules
/bots/node_modules/
package-lock.json
/example/package-lock.json
yarn.lock
/example/yarn.lock

# Expo
.expo
example/dist

# Test generated files
/ReactAndroid/src/androidTest/assets/AndroidTestBundle.js
12 changes: 9 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -22,15 +22,21 @@ Some notes about example app:
cd example/ios ; RNMBX11=1 pod update MapboxMaps
```
To build example in this mode on android:
Change `RNMBX11=true` in `example/android/gralde.properties`
Change `RNMBX11=true` in `example/android/gradle.properties`
- NewArchitecture/Fabric:
```
cd example/ios ; RCT_NEW_ARCH_ENABLED=1 pod update MapboxMaps
```
On android change `newArchEnabled=true` in `example/android/gralde.properties`
On android change `newArchEnabled=true` in `example/android/gradle.properties`

### Running example app for Web

## Best practices for PR's
```
npx expo start -c --web
```


## Best practices for PRs
- If you plan to work on a bigger feature, please open a discussion, to discuss the best way to address it
- If you add a feature, make sure you add it to the documentation
- Use meaningful commit messages, use semantic commit messages
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -252,4 +252,4 @@ Help drive this repo forward - be a sponsor. Add a comment [here](https://github
---
## Developer Group

Have a question or need some help? Join our [Gitter developer group](https://gitter.im/rnmapbox/Lobby)!
Have a question or need some help? Use [Github discussions](https://github.com/rnmapbox/maps/discussions) or the [react-native channel](https://discord.com/channels/1004826913229000704/1092426983696248893) in the mapbox discord.
17 changes: 11 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def defaultMapboxMapsImpl = "mapbox"
def defaultMapboxMapsVersion = "10.17.0"
def defaultMapboxMapsVersion = "10.18.4"

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
@@ -31,7 +31,11 @@ buildscript {
mavenCentral()
}

project.ext.set("kotlinVersion", rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : '1.7.21')
ext {
rnmapboxDefaultKotlinVersion = '1.7.21'
}

project.ext.set("kotlinVersion", rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : rnmapboxDefaultKotlinVersion)
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${project.kotlinVersion}"
}
@@ -72,6 +76,7 @@ android {
} else {
java.srcDirs += 'src/main/mapbox-v11-compat/v10'
}
java.srcDirs += 'src/main/rn-compat/rn75'
if (safeExtGet("RNMapboxMapsUseV11", false)) {
logger.warn("RNMapboxMapsUseV11 is deprecated, just set RNMapboxMapsVersion to 11.*")
}
@@ -158,15 +163,15 @@ dependencies {
} else {
msg = '@rnmapbox/maps: RNMapboxMapsImpl has invalid value - only mapbox supported - see https://github.com/rnmapbox/maps/wiki/Deprecated-RNMapboxImpl-Maplibre#android'
logger.error(msg)
throw new GradleException(msg)
throw new GradleException(msg)
}
}

// Dependencies
customizableDependencies('RNMapboxMapsSupportLibs') {
implementation "com.android.support:support-vector-drawable:28.0.0"
//implementation "com.android.support:support-vector-drawable:28.0.0"
implementation "com.android.support:support-annotations:28.0.0"
implementation "com.android.support:appcompat-v7:28.0.0"
//implementation "com.android.support:appcompat-v7:28.0.0"
}
customizableDependencies('RNMapboxMapsOkHTTPLibs') {
implementation "com.squareup.okhttp3:okhttp:4.9.0"
@@ -183,4 +188,4 @@ dependencies {

tasks.withType(Test).configureEach {
useJUnitPlatform()
}
}
4 changes: 2 additions & 2 deletions android/install.md
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ Set `RNMapboxMapsVersion` in `android/build.gradle > buildscript > ext` section
```groovy
buildscript {
ext {
RNMapboxMapsVersion = '11.3.0'
RNMapboxMapsVersion = '11.4.1'
}
}
```
@@ -70,7 +70,7 @@ buildscript {
```groovy
buildscript {
ext {
RNMapboxMapsVersion = '11.3.0'
RNMapboxMapsVersion = '11.4.1'
}
}
```
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ import com.rnmapbox.rnmbx.utils.Logger
/**
* Created by nickitaliano on 8/23/17.
*/
abstract class AbstractEventEmitter<T : ViewGroup?>(reactApplicationContext: ReactApplicationContext) :
abstract class AbstractEventEmitter<T : ViewGroup>(reactApplicationContext: ReactApplicationContext) :
ViewGroupManager<T>() {
private val mRateLimitedEvents: MutableMap<String, Long>
private var mEventDispatcher: EventDispatcher? = null
@@ -56,8 +56,8 @@ abstract class AbstractEventEmitter<T : ViewGroup?>(reactApplicationContext: Rea
}
}

override fun addEventEmitters(context: ThemedReactContext, view: T & Any) {
mEventDispatcher = UIManagerHelper.getEventDispatcherForReactTag(context, view!!.id)
override fun addEventEmitters(context: ThemedReactContext, view: T) {
mEventDispatcher = UIManagerHelper.getEventDispatcherForReactTag(context, view.id)
}

override fun getExportedCustomDirectEventTypeConstants(): Map<String, Any>? {
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ class RNMBXPointAnnotationManager(reactApplicationContext: ReactApplicationConte
}

override fun createViewInstance(reactContext: ThemedReactContext): RNMBXPointAnnotation {
return RNMBXPointAnnotation(reactContext!!, this)
return RNMBXPointAnnotation(reactContext, this)
}

override fun onDropViewInstance(view: RNMBXPointAnnotation) {
Original file line number Diff line number Diff line change
@@ -99,9 +99,11 @@ class RNMBXCamera(private val mContext: Context, private val mManager: RNMBXCame
override fun addToMap(mapView: RNMBXMapView) {
super.addToMap(mapView)
mapView.callIfAttachedToWindow {
setInitialCamera()
updateMaxBounds()
mCameraStop?.let { updateCamera(it) }
withMapView { mapView ->
setInitialCamera(mapView)
updateMaxBounds(mapView)
mCameraStop?.let { updateCamera(it, mapView) }
}
}
_observeViewportState(mapView.mapView)
_updateViewportState()
@@ -117,8 +119,8 @@ class RNMBXCamera(private val mContext: Context, private val mManager: RNMBXCame
fun setStop(stop: CameraStop) {
mCameraStop = stop
stop.setCallback(mCameraCallback)
if (mMapView != null) {
stop.let { updateCamera(it) }
withMapView { mapView ->
stop.let { updateCamera(it, mapView) }
}
}

@@ -172,25 +174,24 @@ class RNMBXCamera(private val mContext: Context, private val mManager: RNMBXCame

fun setMaxBounds(bounds: LatLngBounds?) {
mMaxBounds = bounds
updateMaxBounds()
withMapView { mapView ->
updateMaxBounds(mapView)
}
}


private fun updateMaxBounds() {
withMapView { mapView ->
val map = mapView.getMapboxMap()
val builder = CameraBoundsOptions.Builder()
builder.bounds(mMaxBounds?.toBounds())
builder.minZoom(mMinZoomLevel ?: 0.0) // Passing null does not reset this value.
builder.maxZoom(mMaxZoomLevel ?: 25.0) // Passing null does not reset this value.
map.setBounds(builder.build())
mCameraStop?.let { updateCamera(it) }
}
private fun updateMaxBounds(mapView: RNMBXMapView) {
val map = mapView.getMapboxMap()
val builder = CameraBoundsOptions.Builder()
builder.bounds(mMaxBounds?.toBounds())
builder.minZoom(mMinZoomLevel ?: 0.0) // Passing null does not reset this value.
builder.maxZoom(mMaxZoomLevel ?: 25.0) // Passing null does not reset this value.
map.setBounds(builder.build())
mCameraStop?.let { updateCamera(it, mapView) }
}

private fun setInitialCamera() {
private fun setInitialCamera(mapView: RNMBXMapView) {
mDefaultStop?.let {
val mapView = mMapView!!
val map = mapView.getMapboxMap()

it.setDuration(0)
@@ -200,9 +201,9 @@ class RNMBXCamera(private val mContext: Context, private val mManager: RNMBXCame
}
}

private fun updateCamera(cameraStop: CameraStop) {
private fun updateCamera(cameraStop: CameraStop, mapView: RNMBXMapView) {
mCameraUpdateQueue.offer(cameraStop)
mCameraUpdateQueue.execute(mMapView)
mCameraUpdateQueue.execute(mapView)
}

private fun updateUserLocation(isAnimated: Boolean) {
@@ -243,12 +244,12 @@ class RNMBXCamera(private val mContext: Context, private val mManager: RNMBXCame

fun setMinZoomLevel(zoomLevel: Double?) {
mMinZoomLevel = zoomLevel
updateMaxBounds()
withMapView { updateMaxBounds(it) }
}

fun setMaxZoomLevel(zoomLevel: Double?) {
mMaxZoomLevel = zoomLevel
updateMaxBounds()
withMapView { updateMaxBounds(it) }
}

fun setZoomLevel(zoomLevel: Double) {
Original file line number Diff line number Diff line change
@@ -13,9 +13,10 @@ import com.rnmapbox.rnmbx.utils.ViewTagResolver
import com.rnmapbox.rnmbx.utils.extensions.asBooleanOrNull
import com.rnmapbox.rnmbx.utils.extensions.asDoubleOrNull
import com.rnmapbox.rnmbx.utils.extensions.asStringOrNull
import com.rnmapbox.rnmbx.rncompat.dynamic.*

class RNMBXCameraManager(private val mContext: ReactApplicationContext, val viewTagResolver: ViewTagResolver) :
AbstractEventEmitter<RNMBXCamera?>(
AbstractEventEmitter<RNMBXCamera>(
mContext
), RNMBXCameraManagerInterface<RNMBXCamera> {
override fun customEvents(): Map<String, String>? {
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ import com.rnmapbox.rnmbx.events.constants.EventKeys
import com.rnmapbox.rnmbx.events.constants.eventMapOf
import com.rnmapbox.rnmbx.utils.ViewTagResolver

class RNMBXViewportManager(private val mContext: ReactApplicationContext, val viewTagResolver: ViewTagResolver) : AbstractEventEmitter<RNMBXViewport?>(
class RNMBXViewportManager(private val mContext: ReactApplicationContext, val viewTagResolver: ViewTagResolver) : AbstractEventEmitter<RNMBXViewport>(
mContext
), RNMBXViewportManagerInterface<RNMBXViewport> {

Loading