Merge marker and marker into one for Android and IOS!
npm i --save react-native-marker-imageimport 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>
);
}The image source (either a remote URL or a local file resource).
| Type | Required |
|---|---|
| ImageSourcePropType | Yes |
The marker image source (either a remote URL or a local file resource).
| Type | Required |
|---|---|
| ImageSourcePropType | Yes |
The marker image size.
| Type | Required |
|---|---|
| number | Yes |
Add click and move responders to marker.
| Type | Required |
|---|---|
| bool | No |
This property represents the position according to the screen.
| Type | Required |
|---|---|
| object: {x: number, y: number} | No |
Similarly to markerPosition, this property represents the position according to the original image size.
| Type | Required |
|---|---|
| object: {x: number, y: number} | No |
Invoked when the marker position changed.
| Type | Required |
|---|---|
| function | No |
MIT
