anchored overlay for pigeon-maps
Switch branches/tags
Clone or download
Latest commit 6558da6 Oct 4, 2017
Permalink
Failed to load latest commit information.
demo inferno version Dec 25, 2016
docs build Oct 4, 2017
lib build Oct 4, 2017
src upgrade packages, add proptypes Oct 4, 2017
.babelrc demo, babel, inferno Dec 26, 2016
.eslintrc overlay Dec 20, 2016
.gitignore overlay Dec 20, 2016
LICENSE.md overlay Dec 20, 2016
README.md demo, babel, inferno Dec 26, 2016
_pigeon_config.js no local maps Dec 20, 2016
build.js overlay Dec 20, 2016
package.json 0.2.2 Oct 4, 2017
webpack.config.js upgrade packages, add proptypes Oct 4, 2017
yarn.lock upgrade packages, add proptypes Oct 4, 2017

README.md

pigeon-overlay - Overlay component for pigeon-maps

npm version

React demo: https://mariusandra.github.io/pigeon-overlay/

Inferno demo: https://mariusandra.github.io/pigeon-overlay/inferno/

Example: https://github.com/mariusandra/pigeon-overlay/blob/master/demo/demo.js

API: https://github.com/mariusandra/pigeon-overlay/blob/master/src/index.js

To use in your component (with beta version 0.2.0):

// default for React
import Overlay from 'pigeon-overlay'

// explicitly ask for the React version
import Overlay from 'pigeon-overlay/react'

// explicitly ask for the Inferno version
import Overlay from 'pigeon-overlay/inferno'

// choose the Inferno or React version based on BABEL_ENV
import Overlay from 'pigeon-overlay/infact'

// image in the overlay
import pigeon from './pigeon.jpg'

class Demo extends Component {
  render () {
    return (
      <Map defaultCenter={[50.879, 4.6997]} defaultZoom={12} width={600} height={400}>
        <Overlay anchor={[50.879, 4.6997]} offset={[60, 39]}>
          <img src={pigeon} width={120} height={79} alt='' />
        </Overlay>
      </Map>
    )
  }
}