react-native-marker-image

1.0.2 • Public • Published

react-native-marker-image

npm package Supports Android and iOS MIT License code style: prettier

Merge marker and marker into one for Android and IOS!

HOW TO INSTALL ?

npm i --save react-native-marker-image

HOW TO USE ?

import ImageMarker from "react-native-marker-image";
 
function MyComponent() {
    return (
        <View>
            <ImageMarker
                image={require("./assets/garage.jpeg")}
                markerImage={require("./assets/marker.png")}
                markerSize={50}
                onChange={data => console.log(data)}
            />
        </View>
    );
}

Result

Simulator Screen Shot

Reference

Props

image

The image source (either a remote URL or a local file resource).

Type Required
ImageSourcePropType Yes

markerImage

The marker image source (either a remote URL or a local file resource).

Type Required
ImageSourcePropType Yes

markerSize

The marker image size.

Type Required
number Yes

markerMove

Add click and move responders to marker.

Type Required
bool No

markerPosition

This property represents the position according to the screen.

Type Required
object: {x: number, y: number} No

originMarkerPosition

Similarly to markerPosition, this property represents the position according to the original image size.

Type Required
object: {x: number, y: number} No

onChange

Invoked when the marker position changed.

Type Required
function No

LICENSE

MIT

Package Sidebar

Install

npm i react-native-marker-image

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

952 kB

Total Files

6

Last publish

Collaborators

  • ayoubamine