A react component that can draw arbitrary graphics、arbitrary maps and motion path in canvas by using latitude and longitude easily just like copying.
English | 简体中文
- Adhere to the principle of simplicity, you will not spend too much energy
In general, even if you master the canvas and svg well, you will still face many challenges in the drawing process. The biggest challenge is how to get the coordinates easily, which including the vertex coordinates of various shapes, and any coordinates you want to know relative to a reference. So how relaxed it will be if you can draw a graph in canvas as easily as copy a graph.
In view of this, I chose to draw using latitude and longitude. Here,the longitude is the X coordinate, and the latitude is the y coordinate.
So you can pick up a set of coordinate points of a graph that you see or in your mind on Google maps. With these points, you can draw the corresponding graphics.
Modern browsers and Internet Explorer support canvas
9+ | 3.6+ | 4+ | 4+ | 4+ |
npm install easy-drawing
yarn add easy-drawing
import EasyDrawing from 'easy-drawing';
MIT © Facebook Inc.