react-native-marker-image
v1.0.2
Published
Merge image and marker into one!
Downloads
6
Readme
react-native-marker-image
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
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