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. * sighting type.
*/ */
sightingIcon = (type) => { sightingIcon = (type) => {
let pinIcon let pinIcon;
switch(type) { switch(type) {
case 'visual': case 'visual':
pinIcon = 'https://i.postimg.cc/nhYXGQNp/marten-icon.png' pinIcon = '/mapicons/marten-icon.png';
break break;
case 'roadkill': case 'roadkill':
pinIcon = 'https://i.postimg.cc/xdfcx1SH/tire-icon.png' pinIcon = '/mapicons/tire-icon.png';
break break;
case 'viewed_tracks': case 'viewed_tracks':
pinIcon = 'https://i.postimg.cc/7P761WCS/paws.png' pinIcon = '/mapicons/paws.png';
break break;
case 'trapped': case 'trapped':
pinIcon = 'https://i.postimg.cc/Y9LSsXdK/cage.png' pinIcon = '/mapicons/cage.png';
break break;
case 'photo':
pinIcon = '/mapicons/photo-icon.png'
break;
case 'other':
pinIcon = '/mapicons/other-icon.png'
break;
default: default:
break break
} }
return pinIcon
return pinIcon;
} }
formatDate = date => { formatDate = date => {