import React from 'react'; import MapView, {Circle, Polygon} from 'react-native-maps'; import {getFovCone} from '../../utils/geoMath'; const PlayerMapView = ({ userLocation, visibleCache, heading }) => { // Initialisation ------------- // State ---------------------- // Handlers ------------------- // View ----------------------- if (!userLocation) return null; const coneCoords = (heading !== null && heading !== undefined) ? getFovCone(userLocation, heading) : null; return ( {visibleCache ? ( ) : null} {coneCoords && ( )} ); }; export default PlayerMapView;