import React from "react"; import withGoogleApiKey from "./with-google-key.component"; // TODO eventually we want this to query and show other players const RoundSummary = ({ googleApiKey, round, onNext }) => { const { roundNum, selectedPoint, targetPoint, score, totalScore, } = round; // TODO determine zoom and center dynamically, or make this a dynamic map const mapUrl = `https://maps.googleapis.com/maps/api/staticmap?key=${googleApiKey}`; const size = `&size=600x400` const zoom = `&zoom=5`; const centerOnTarget = `¢er=${targetPoint.lat},${targetPoint.lng}`; const targetMarker = `&markers=color:blue|label:T|${targetPoint.lat},${targetPoint.lng}`; const selectedMarker = selectedPoint ? `&markers=color:red|label:S|${selectedPoint.lat},${selectedPoint.lng}` : "" return (
{`Map {selectedPoint ?

You Selected: {`${selectedPoint.lat},${selectedPoint.lng}`}

:

Timed out!

}

Target: {targetPoint.lat},{targetPoint.lng}

Score For Round {roundNum}: {score}

Running Total Score: {totalScore}

); } const RoundSummaryWithApiKey = withGoogleApiKey(RoundSummary); export default RoundSummaryWithApiKey;