App now loads map icons from public folder. Also added icons for the sighting types photo and other.

This commit is contained in:
wildscotsmen 2018-11-04 22:04:31 -05:00
parent 0a8120e826
commit 83982d8f88
7 changed files with 17 additions and 10 deletions

BIN
public/mapicons/cage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
public/mapicons/paws.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

View File

@ -212,25 +212,32 @@ export class MapContainer extends Component {
* sighting type.
*/
sightingIcon = (type) => {
let pinIcon
let pinIcon;
switch(type) {
case 'visual':
pinIcon = 'https://i.postimg.cc/nhYXGQNp/marten-icon.png'
break
pinIcon = '/mapicons/marten-icon.png';
break;
case 'roadkill':
pinIcon = 'https://i.postimg.cc/xdfcx1SH/tire-icon.png'
break
pinIcon = '/mapicons/tire-icon.png';
break;
case 'viewed_tracks':
pinIcon = 'https://i.postimg.cc/7P761WCS/paws.png'
break
pinIcon = '/mapicons/paws.png';
break;
case 'trapped':
pinIcon = 'https://i.postimg.cc/Y9LSsXdK/cage.png'
break
pinIcon = '/mapicons/cage.png';
break;
case 'photo':
pinIcon = '/mapicons/photo-icon.png'
break;
case 'other':
pinIcon = '/mapicons/other-icon.png'
break;
default:
break
}
return pinIcon
return pinIcon;
}
formatDate = date => {