staticmaps-react
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Render static maps with React

This small package allows you to render static maps easly with react.

It uses svg to render the tiles and the vectors for the MultiPolygon. You can specify a bounding box or if you pass any shape, it will automatically find the bounds for the shapes you want to add.

demo

Instalation

yarn add staticmaps-react

Usage

<StaticMap
  width={250}
  height={250}
  padding={[5, 5]}
  tileProvider={esriWorldImageryTileProvider}
  multiPolygons={[rosaMP]}
  markers={[rosaMarker1]}
/>

Available shapes

  • Base TileLayer using x,y,z
  • Marker
  • MultiPolygon
  • OverlayImage

Demo

See a simple demo here

yarn preview

Todo

  • [ ] The basics of this project are not react related, so i hope to extract that into a core package and create implementations for Svelte and Vuejs maybe.
  • [ ] Fix and improve the unit tests

Readme

Keywords

none

Package Sidebar

Install

npm i staticmaps-react

Weekly Downloads

16

Version

0.2.0

License

MIT

Unpacked Size

48.6 kB

Total Files

36

Last publish

Collaborators

  • porfirio