How to use react-native-image-marker - 10 common examples

To help you get started, we鈥檝e selected a few react-native-image-marker 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 JimmyDaddy / react-native-image-marker / example / markerExample / App.js View on Github external
}).then((path) => {
        this.setState({
          show: true,
          uri: this.state.saveFormat === ImageFormat.base64 ? path : Platform.OS === 'android' ? 'file://' + path : path,
          loading: false
        })
      }).catch((err) => {
        console.log('====================================')
github JimmyDaddy / react-native-image-marker / example / markerExample / App.js View on Github external
_markByPosition = (type) => {
    this._showLoading()
    if (this.state.markImage) {
      Marker.markImage({
        src: this.state.image,
        markerSrc: this.state.markImage,
        position: type,
        scale: 1,
        markerScale: 1,
        quality: 100,
        saveFormat: this.state.saveFormat
      }).then((path) => {
        this.setState({
          uri: this.state.saveFormat === ImageFormat.base64 ? path : Platform.OS === 'android' ? 'file://' + path : path,
          show: true,
          loading: false
        })
      }).catch((err) => {
        console.log('====================================')
        console.log(err, 'err')
github JimmyDaddy / react-native-image-marker / example / markerExample / App.js View on Github external
markerScale: 1,
        quality: 100,
        saveFormat: this.state.saveFormat
      }).then((path) => {
        this.setState({
          uri: this.state.saveFormat === ImageFormat.base64 ? path : Platform.OS === 'android' ? 'file://' + path : path,
          show: true,
          loading: false
        })
      }).catch((err) => {
        console.log('====================================')
        console.log(err, 'err')
        console.log('====================================')
      })
    } else {
      Marker.markText({
        src: this.state.image,
        text: `text marker
         muiltline text`,
        position: type,
        color: '#FF0000',
        fontName: 'Arial-BoldItalicMT',
        fontSize: 44,
        scale: 1,
        quality: 100,
        shadowStyle: this.state.useTextShadow ? {
          dx: 10.5,
          dy: 20.8,
          radius: 20.9,
          color: '#0000FF'
        } : null,
        textBackgroundStyle: this.state.useTextBgStyle ? {
github JimmyDaddy / react-native-image-marker / example / markerExample / App.js View on Github external
_switchBase64Res = () => {
    this.setState({
      saveFormat: this.state.saveFormat === ImageFormat.base64 ? ImageFormat.png : ImageFormat.base64
    })
  }
github JimmyDaddy / react-native-image-marker / example / markerExample / App.js View on Github external
constructor (props) {
    super(props)
    this.state = {
      uri: '',
      image: bg,
      marker: icon,
      markImage: true,
      base64: false,
      useTextShadow: true,
      useTextBgStyle: true,
      textBgStretch: 0,
      saveFormat: ImageFormat.png,
      loading: false
    }
  }
github JimmyDaddy / react-native-image-marker / example / markerExample / App.js View on Github external
              onPress={() => this._markByPosition(Position.bottomCenter)}
            >
github JimmyDaddy / react-native-image-marker / example / markerExample / App.js View on Github external
              onPress={() => this._markByPosition(Position.bottomLeft)}
            >
github JimmyDaddy / react-native-image-marker / example / markerExample / App.js View on Github external
              onPress={() => this._markByPosition(Position.bottomRight)}
            >