1.3.4 • Published 9 months ago

@charlespalmerbf/react-native-leaflet-js v1.3.4

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@charlespalmerbf/react-native-leaflet-js

A LeafletView component using WebView and Leaflet map for React Native applications

Notes: This project is forked from https://github.com/pavel-corsaghin/react-native-leaflet, who no longer maintains his fork.

Installation

Install using npm or yarn like this:

npm install --save @charlespalmerbf/react-native-leaflet-js

or

yarn add @charlespalmerbf/react-native-leaflet-js

Usage

import { LatLng, LeafletView } from '@charlespalmerbf/react-native-leaflet-js';

<LeafletView
    // The rest of your props, see the list below
/>

Props

propertyrequiredtypepurpose
loadingIndicatoroptionalReact.ReactElementcustom component displayed while the map is loading
onErroroptionalfunctionWill receive an error event
onLoadEndoptionalfunctionCalled when map stops loading
onLoadStartoptionalfunctionCalled when the map starts to load
onMessageReceivedrequiredfunctionThis function receives messages in the form of a WebviewLeafletMessage object from the map
mapLayersoptionalMapLayer arrayAn array of map layers
mapMarkersoptionalMapMarker arrayAn array of map markers
mapShapesoptionalMapShape[]An array of map shapes
mapCenterPositionoptional{lat: Lat, lng: Lng} objectThe center position of the map. This coordinate will not be accurate if the map has been moved manually. However, calling the map's setMapCenterPosition function will cause the map to revert to this location
ownPositionMarkeroptionalMarkerA special marker that has an ID of OWN_POSTION_MARKER_ID
zoomoptionalnumberDesired zoom value of the map
doDebugoptionalbooleanA flag for debug message logging
1.3.4

9 months ago

1.2.4

10 months ago

1.2.3

10 months ago

1.2.2

10 months ago

1.1.2

10 months ago

1.1.1

10 months ago

1.1.0

10 months ago

1.0.0

10 months ago

0.1.3

10 months ago