react-native-image-marker icon indicating copy to clipboard operation
react-native-image-marker copied to clipboard

null is not an object (evaluating 'imageMarker.addTextByPostion')

Open joeljerushan opened this issue 5 years ago • 4 comments

Can you help me to find what i was doing wrong here.. im getting following error null is not an object (evaluating 'imageMarker.addTextByPostion') my function code follows

        Marker.markText({
            src: this.state.imageurl,
            text: 'text marker', 
            position: 'topLeft', 
            color: '#FF0000',
            fontName: 'Arial-BoldItalicMT', 
            fontSize: 44, 
            mShadowStyle: {
                dx: 10.5,
                dy: 20.8,
                radius: 20.9,
                color: '#ff00ff'
            },
            scale: 1, 
            quality: 100,
            filename: 'hello_oii'
        }).then((res) => {
            this.setState({
                uri : 'SET URL'
            })
        }).catch((err) => {
            console.log(err)
            this.setState({
                uri : 'UNSET URL',
                err
            })
        })

image (below screenshot)

joeljerushan avatar May 12 '19 18:05 joeljerushan

@joeljerushan Did you run react-native link react-native-image-marker?

JimmyDaddy avatar May 13 '19 08:05 JimmyDaddy

@JimmyDaddy i have done it by Manual Linking, react-native link react-native-image-marker this not working for iOs. so Problem Solved for me.

is there any way to align Text only Vertically and fixed number for Horizontally ? Text should start from center check attached screenshot. when i use bottomCenter text showing from center that is fine but i wanted to align it to fixed Horizontally and centered Vertical Text Placement. by doing this my text will appear inside green highlighted box

image

joeljerushan avatar May 13 '19 09:05 joeljerushan

same error for me.

"react-native": "0.61.1",
"react-native-image-marker": "^0.6.1",
屏幕快照 2019-11-04 19 08 58

weiliang903 avatar Nov 04 '19 11:11 weiliang903

resolved. Thanks

watchman watch-del-all
rm -rf node_modules

weiliang903 avatar Nov 05 '19 05:11 weiliang903