0.0.4 • Published 5 years ago

react-google-maps-geotiff-overlay v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

react-google-maps-geotiff-overlay

Easily overlay geotiff images on top of react google maps

NPM JavaScript Style Guide

Install

npm install --save react-google-maps-geotiff-overlay

Usage

GeoTIFFOverlay only needs binary image data provided as a prop.

import React, { Component } from 'react'

import GeoTIFFOverlay from 'react-google-maps-geotiff-overlay'
import { GoogleMap, LoadScript } from '@react-google-maps/api'


class Example extends Component {
  render () {
    return (
          <LoadScript
            id='script-loader'
            googleMapsApiKey={...}
          >
            <GoogleMap
              onLoad={map => {
                this.mapRef = map
              }}
              id='example'
              mapContainerStyle={{
                height: '768px',
                width: '100%'
              }}
              zoom={4}
              center={{ lat: 30.397, lng: 10.644 }}
            >
              <GeoTIFFOverlay overlayData={...} />
            </GoogleMap>
          </LoadScript >
    )
  }
}

opacity

Use opacity prop to control overlay transparence

<GeoTIFFOverlay overlayData={...} opacity={0.5}/>

draw

Use draw prop to contol overlay visibility (hide/show)

<GeoTIFFOverlay overlayData={...} draw={false}/>

License

MIT © desmoteo

react-google-maps-geotiff-overlay

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago