thêm giao diện map và cập nhật nativewind

This commit is contained in:
Tran Anh Tuan
2025-10-30 17:55:25 +07:00
parent d717a360b7
commit f9ca9542c4
31 changed files with 1068 additions and 65 deletions

30
services/map_service.ts Normal file
View 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;
}
};