1.0.2 • Published 2 years ago

react-native-google-static-map-next v1.0.2

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

react-native-google-static-map-next

An <Image/> element with a url to Google Static Map See Google Static Maps API.

License Languages Contributors


Installation

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

ou

yarn react-native-google-static-map-next

Usage

import {GoogleStaticMapNext} from 'react-native-google-static-map-next'

function Example() {
  return (
    <GoogleStaticMapNext
      style={styles.staticMap}
      location={{
        latitude: '-33.8688',
        longitude: '151.2195',
      }}
      size={{ width: 400, height: 400 }}
      apiKey="123456789-ABCDFGHIJK
    />
  );
}

Props

PropTypeDescriptionDefault
locationObjectthe map location - { latitude: '-33.8688', longitude: '151.2195' }undefined
sizestringthe image size - { width: 300, height: 550 }undefined
zoomnumberdefines the zoom level of the map.15
scalenumberscale=2 returns twice as many pixels as scale=1.1
formatnumber'png', 'gif', 'jpg'png
mapTypestring'roadmap', 'satellite', 'terrain', 'hybrid'.roadmap
hasCenterMarkerbooladd a marker on the center.true
apiKeystringGoogle API Keyundefined
customMarkerUrlstringCustom marker urlundefined

Issues

Feel free to file a new issue with a respective title and description on the the react-native-google-static-map-next repository. If you already found a solution to your problem, i would love to review your pull request! Have a look at our contribution guidelines to find out about the coding standards.

Contributing

Check out the contributing page to see the best places to file issues, start discussions and begin contributing.

License

This project is under the MIT license.

Author