Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Custom Styles on iOS #3434

Open
jadephare opened this issue Mar 25, 2024 · 1 comment
Open

[Bug]: Custom Styles on iOS #3434

jadephare opened this issue Mar 25, 2024 · 1 comment
Labels
bug 🪲 Something isn't working

Comments

@jadephare
Copy link

jadephare commented Mar 25, 2024

Mapbox Implementation

Mapbox

Mapbox Version

11

React Native Version

0.71.8

Platform

iOS

@rnmapbox/maps version

10.1.19

Standalone component to reproduce

import React from 'react'
import { Camera, MapView } from '@rnmapbox/maps'

  const MapCameraProps = {
        // styleJSON: '',  {/**anything other than the default styleJSON, ie an exported style json file from mapbox... I think it needs to have some v11 styling to be black */}
}

export default function App() {
  return (
    <MapView {...MapCameraProps} style={{ flex: 1 }} 
>
      <Camera
        zoomLevel={8}
      />
    </MapView>
  )
}


Observed behavior and steps to reproduce

When I comment out the styleJSON around line 25 the default style loads. If I uncomment it, and fresh restart, the style loads completely black with no map. I know the style works because if I change the style file and save it, uncomment the line, the hot reloading will allow the map to load.

Expected behavior

Map loads with expected styleJSON

Notes / preliminary analysis

Seems like something about how the style is getting loaded isn't allowing the custom style to load on iOS. Android works fine.

The style I'm loading is v11 and I believe I have all the things set up based on this guide: here

Additional links and references

Are other people running into this issue?

@jadephare jadephare added the bug 🪲 Something isn't working label Mar 25, 2024
@jadephare
Copy link
Author

open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant