mariusandra / pigeon-overlay

anchored overlay for pigeon-maps

Home Page:https://mariusandra.github.io/pigeon-overlay/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NB! This is deprecated! Use the <Overlay /> component directly inside pigeon-maps

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>
    )
  }
}

About

anchored overlay for pigeon-maps

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

License:MIT License


Languages

Language:JavaScript 100.0%