thêm giao diện map và cập nhật nativewind
This commit is contained in:
30
services/map_service.ts
Normal file
30
services/map_service.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import shipAlarmIcon from "../assets/icons/ship_alarm.png";
|
||||
import shipAlarmFishingIcon from "../assets/icons/ship_alarm_fishing.png";
|
||||
import shipOnlineIcon from "../assets/icons/ship_online.png";
|
||||
import shipOnlineFishingIcon from "../assets/icons/ship_online_fishing.png";
|
||||
import shipUndefineIcon from "../assets/icons/ship_undefine.png";
|
||||
import shipWarningIcon from "../assets/icons/ship_warning.png";
|
||||
import shipWarningFishingIcon from "../assets/icons/ship_warning_fishing.png";
|
||||
import shipSosIcon from "../assets/icons/sos_icon.png";
|
||||
|
||||
export const getShipIcon = (type: number, isFishing: boolean) => {
|
||||
console.log("type, isFishing", type, isFishing);
|
||||
|
||||
if (type === 1 && !isFishing) {
|
||||
return shipWarningIcon;
|
||||
} else if (type === 2 && !isFishing) {
|
||||
return shipAlarmIcon;
|
||||
} else if (type === 0 && !isFishing) {
|
||||
return shipOnlineIcon;
|
||||
} else if (type === 1 && isFishing) {
|
||||
return shipWarningFishingIcon;
|
||||
} else if (type === 2 && isFishing) {
|
||||
return shipAlarmFishingIcon;
|
||||
} else if (type === 0 && isFishing) {
|
||||
return shipOnlineFishingIcon;
|
||||
} else if (type === 3) {
|
||||
return shipSosIcon;
|
||||
} else {
|
||||
return shipUndefineIcon;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user