How to use the @react-native-mapbox-gl/maps.StyleURL function in @react-native-mapbox-gl/maps

To help you get started, we’ve selected a few @react-native-mapbox-gl/maps examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github developmentseed / observe / app / screens / Explore.js View on Github external
getCurrentTraceStatus,
  getTracesGeojson,
  getPhotosGeojson
} from '../selectors'
import BasemapModal from '../components/BasemapModal'
import ActionButton from '../components/ActionButton'
import Icon from '../components/Collecticons'
import { colors } from '../style/variables'
import { CameraButton } from '../components/CameraButton'
import { RecordButton } from '../components/RecordButton'

import icons from '../assets/icons'
import { authorize } from '../services/auth'

let osmStyleURL = Config.MAPBOX_STYLE_URL || MapboxGL.StyleURL.Street
let satelliteStyleURL = Config.MAPBOX_SATELLITE_STYLE_URL || MapboxGL.StyleURL.Satellite

// fix asset URLs for Android
if (!osmStyleURL.includes(':/') && Platform.OS === 'android') {
  osmStyleURL = `asset://${osmStyleURL}`
}

if (!satelliteStyleURL.includes(':/') && Platform.OS === 'android') {
  satelliteStyleURL = `asset://${satelliteStyleURL}`
}

const Container = styled.View`
  flex: 1;
  display: flex;
  flex-flow: column nowrap;
`
const MainBody = styled.View`
github developmentseed / observe / app / screens / OfflineMaps / ViewOfflineAreaDetail.js View on Github external
import EditMapModal from '../../components/EditMapModal'
import PageWrapper from '../../components/PageWrapper'
import {
  deleteOfflineResource,
  refreshOfflineResource,
  renameOfflineResource
} from '../../actions/map'
import { getOfflineResourceStatus } from '../../selectors'

const Text = styled.Text`
`
const Bold = styled.Text`
  font-weight: bold;
`

let osmStyleURL = Config.MAPBOX_STYLE_URL || MapboxGL.StyleURL.Street

// fix asset URLs
if (!osmStyleURL.includes(':/')) {
  osmStyleURL = `asset://${osmStyleURL}`
}

class ViewOfflineAreaDetail extends React.Component {
  static navigationOptions = ({ navigation }) => {
    return {
      title: 'Area'
    }
  }

  state = {
    deleteModalVisible: false,
    editModalVisible: false,