Skip to content

ayoubamine/react-native-marker-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Merge image and marker into one!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published