🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-google-static-map

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-google-static-map

A wrapper for Google's Static Maps

0.1.0
latest
Source
npm
Version published
Weekly downloads
7
600%
Maintainers
1
Weekly downloads
 
Created
Source

react-google-static-map

Google Static Maps Component for React

Most of the code is from https://github.com/yelled3/react-native-google-static-map

Installation

npm install --save react-google-static-map

Usage

var GoogleStaticMap = require('react-google-static-map');

class MapExample extends React.Component {
  render() {
    return (
        <GoogleStaticMap
            style={styles.map} {...locationProps}
            latitude={'32.064171'}
            longitude={'34.7748068'}
            zoom={13}
            size={{ width: 300, height: 550 }}
        />
    );
  }
}

Props

PropTypeDescription
latitudestringlatitude point.
longitudestringlongitude point.
sizeobjectthe image size - { width: 300, height: 550 }
zoomnumberdefines the zoom level of the map.
scalenumberscale=2 returns twice as many pixels as scale=1. The default value is calculated from the screen PixelRatio.
formatstring'png', 'png32', 'jpg', 'gif', 'jpg-baseline'. use the GoogleStaticMap.ImageFormats enum. default is png.
mapTypestring'roadmap', 'satellite', 'terrain', 'hybrid'. use the GoogleStaticMap.MapTypes enum. default is roadmap.
hasCenterMarkerbooladd a marker on the center. default is true.

Keywords

react-component

FAQs

Package last updated on 09 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts