mirror of
https://github.com/expo/react-native-maps.git
synced 2026-11-15 09:18:08 -10:00
* move eslitnt rules to @react-native-community/eslint-config * gitignore VSCode workspace settings * update eslint related packages and remove airbnb ones * add .prettierrc config * automated fix by eslint and prettier * remove custom eslint rules * remove never reported elint exceptions * remove unlimited eslint-disable exceptions * fix formating * fix inline styles * fix react to 16.8.3 and remove babel-preset-react-native
35 lines
836 B
JavaScript
35 lines
836 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { View } from 'react-native';
|
|
import { Polygon, Polyline, Marker } from 'react-native-maps';
|
|
|
|
class XMarksTheSpot extends React.Component {
|
|
render() {
|
|
return (
|
|
<View>
|
|
<Polygon
|
|
coordinates={this.props.coordinates}
|
|
strokeColor="rgba(0, 0, 0, 1)"
|
|
strokeWidth={3}
|
|
/>
|
|
<Polyline
|
|
coordinates={[this.props.coordinates[0], this.props.coordinates[2]]}
|
|
/>
|
|
<Polyline
|
|
coordinates={[this.props.coordinates[1], this.props.coordinates[3]]}
|
|
/>
|
|
<Marker coordinate={this.props.center} />
|
|
</View>
|
|
);
|
|
}
|
|
}
|
|
|
|
XMarksTheSpot.propTypes = {
|
|
coordinates: PropTypes.array,
|
|
center: PropTypes.object,
|
|
zIndex: PropTypes.number,
|
|
};
|
|
|
|
export default XMarksTheSpot;
|