question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

styleURL has not effect in v10 Maps

See original GitHub issue

Describe the bug
styleURL has not effect in v10 Maps

To Reproduce
change the styleURL to MapboxGL.StyleURL.Outdoors or MapboxGL.StyleURL.Dark

Example:

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


class TwoByTwo extends React.Component {

  render() {
    return (
      <MapboxGL.MapView 
  style={{flex: 1}}
  styleURL={MapboxGL.StyleURL.Satellite}>
        <Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
      </MapboxGL.MapView>
    );
  }
}

export default TwoByTwo;

Expected behavior
Map Style need to be changed

Actual behavior
Map Style need to be changed

Screenshots

Screenshot 2022-04-16 at 3 09 48 PM

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
diospyroscommented, Apr 22, 2022

Not sure if this is the design intent, but I got it work using styles from cloud.maptiler (vector style). Couldn’t get it to work with mapbox styles, though.

image

1reaction
ethanwccommented, Jul 27, 2022

To be clear, for @rnmapbox/maps maplibre to work on expo, you need to explicitly specify ‘well known tile server’ before your call to setAccessToken

MapboxGL.setWellKnownTileServer("Mapbox")
Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom style URL makes layers blurred · Issue #1097 - GitHub
I'm using the same custom map style URL for both v6 and v10 ... with the data you provided as it does not...
Read more >
Style Class Reference - Mapbox docs
The name of the image the map style's sprite will use for identification. ... Whether or not the image is treated as a...
Read more >
Loading a MapBox Map in XCode: error code -1002 and ...
I am trying to open a simple map in XCode using MapBox. The build is successful but the simulator is only a black...
Read more >
rnmapbox/Lobby - Gitter
When am I calling MapboxGL.offlineManager.createPack({styleURL: 'asset://land.json'}) with styleURL pointing to local style, the download get stuck at 0%. Does ...
Read more >
Theming your own components - Angular Material
A color configuration is a Sass map. ... $primary: map-get($config, primary); $accent: map-get($config, accent); // Define any styles affected by the theme.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found