diff --git a/src/components/SightingMap.js b/src/components/SightingMap.js index 98b609a..72790de 100644 --- a/src/components/SightingMap.js +++ b/src/components/SightingMap.js @@ -208,7 +208,10 @@ export class MapContainer extends Component { } } -<<<<<<< HEAD + /** + * Determines marker icon based on the + * sighting type. + */ sightingIcon = (type) => { let pinIcon @@ -230,10 +233,10 @@ export class MapContainer extends Component { } return pinIcon -======= + } + formatDate = date => { return (moment(date, "YYYY-MM").format("MMMM YYYY").toString()) ->>>>>>> 48273519cbb4fe2cd134adbfa4e7814237f3021a } // Set the state of the component to contain user coordinates and initial @@ -267,30 +270,11 @@ export class MapContainer extends Component { position={this.state.myLatLng} onClick={this.onMarkerClick} type={'You are here'} - /> - -<<<<<<< HEAD - { this.state.sightings.map((sighting) => { + /> + {this.state.sightings.map((sighting) => { let pinIcon = this.sightingIcon(sighting.type) - return ( - { return ( Date: {this.formatDate(sighting.date)}} time = {Time: {getTime(sighting.time)}} description = {Description: {sighting.desc}} ->>>>>>> 48273519cbb4fe2cd134adbfa4e7814237f3021a + icon={{ + url: pinIcon, + anchor: new google.maps.Point(32,32), + scaledSize: new google.maps.Size(32,32) + }} /> ) })}