0.3.1 • Published 7 years ago

recomaps v0.3.1

Weekly downloads
163
License
-
Repository
-
Last release
7 years ago

Recomaps

Introduction

Recomaps is a Wrapper for openlayers map library.

The main purpose of this library is to help you to create maps with openlayers in React applications without any pain.

Simple example

<Map
  area={this.state.area}
  features={this.state.features}
  initialized={this.state.initialized && this.state.overlays.length > 0}
  layers={this.state.layers}
  zoomControlButtonEnable/>

Installation

  $ npm install recomaps
  import { Map } from 'recomaps'

Dev build

 $ npm install
$ npm start

Open http://localhost:3000 to view it in the browser.

$ npm run lib

API

PropTypeDescription
centerarraylat, long e.g. 16, 52
layersarrayarray of layers objects
overlaysarrayarray of overlays objects
layerSwitcherEnableboolEnable layer switcher
handleBaselayerChangefuncaction after click base layer change
handleOverlayCheckfuncaction after click base layer change
heightnumberheight of map in pixels, default is 400
namestringlayer name if different than 'name' eg. slug_name in layers objects, default is 'name'
bingMapKeystringkey to bing map
featuresarrayfeatures = {type: string, coordinates: array}
featuresColorstringcolor of the features
areaobject{coordinates: polygon, type: string} if exist count centroid and set map center
zoomnumberinitial zoom
minZoomnumberminZoom
maxZoomnumbermaxZoom
heatmapstringURL of geojson to display heatmap
heatmapNamestringname of heatmap layer
zoomButtonColorstringcolof of zoom control button
zoomControlButtonEnableboolzoom control button enable
doubleClickZoomEnablebooldouble click interaction enable
dragPanEnablebooldrag pan interaction enable
mouseWheelZoomEnableboolmouse wheel interaction enable

Layer and overlayer object fields

layer = { name, - layer title slug-name, - layer name layer-type, - layer type visible: - layer visible, }

0.3.1

7 years ago

0.3.0

7 years ago

0.2.26

7 years ago

0.2.25

7 years ago

0.2.24

7 years ago

0.2.23

7 years ago

0.2.22

7 years ago

0.2.21

7 years ago

0.2.20

7 years ago

0.2.19

7 years ago

0.2.18

7 years ago

0.2.17

7 years ago

0.2.16

7 years ago

0.2.15

7 years ago

0.2.14

7 years ago

0.2.13

7 years ago

0.2.12

7 years ago

0.2.11

7 years ago

0.2.10

7 years ago

0.2.9

7 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago