anhquoctran / ra-openstreetmap

<OpenStreetMapInput/> input component for react-admin framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A <OpenStreetMapInput/> component for react-admin

GitHub license GitHub forks GitHub stars GitHub issues GitHub version

The OpenStreetMap binding component for react-admin framework. Powered by react-leaflet

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

About

<OpenStreetMapInput/> input component for react-admin framework

License:MIT License


Languages

Language:TypeScript 100.0%