1.0.2 • Published 6 years ago

react-native-marker-image v1.0.2

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

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).

TypeRequired
ImageSourcePropTypeYes

markerImage

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

TypeRequired
ImageSourcePropTypeYes

markerSize

The marker image size.

TypeRequired
numberYes

markerMove

Add click and move responders to marker.

TypeRequired
boolNo

markerPosition

This property represents the position according to the screen.

TypeRequired
object: {x: number, y: number}No

originMarkerPosition

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

TypeRequired
object: {x: number, y: number}No

onChange

Invoked when the marker position changed.

TypeRequired
functionNo

LICENSE

MIT