<OpenStreetMapInput/>
component for react-admin
A
OpenStreetMap
binding component for react-admin
framework. Powered by react-leaflet
The Installation
Using npm
$ npm install ra-openstreetmap
Or using yarn
$ yarn add ra-openstreetmap
Usage
import React, { FC } from 'react';
import { TextInput, SimpleForm, Edit } from 'react-admin';
import OpenStreetMapInput from 'ra-openstreetmap';
const PostEdit = (props) => {
return (
<Edit>
<SimpleForm>
<TextInput source="title" required />
<TextInput source="description" required />
<OpenStreetMapInput
source="location"
/>
</SimpleForm>
</Edit>
);
};
export default PostEdit;
Prop types reference
Name | Type | Required | Description |
---|---|---|---|
source |
String | * | The react-admin 's form-field source |
className |
String | ||
zoom |
Number | * | |
style |
CSSProperties | ||
bounds |
LatLngBoundsExpression | * |
License
This library is licensed under the MIT Licence.
Author
This library is maintain by @anhquoctran