bill 7 bulan lalu
induk
melakukan
e378fc8b29
3 mengubah file dengan 9 tambahan dan 0 penghapusan
  1. 4 0
      src/api/setting.ts
  2. 3 0
      src/sdk/association/setting.ts
  3. 2 0
      src/store/path.ts

+ 4 - 0
src/api/setting.ts

@@ -7,6 +7,7 @@ type ServeSetting = {
   settingsId?: string;
   pose?: string;
   cover?: string;
+  mapType?: 'satellite' | 'standard',
   back?: string;
 };
 
@@ -22,6 +23,7 @@ export type Setting = {
       rotInModel: SceneLocalPos;
     };
   };
+  mapType: 'satellite' | 'standard',
   cover: string;
   back: string;
   fov?: number;
@@ -33,6 +35,7 @@ const toLocal = (serviceSetting: ServeSetting): Setting => ({
   pose: serviceSetting.pose && JSON.parse(serviceSetting.pose),
   cover: serviceSetting.cover || defaultCover,
   back: serviceSetting.back || "map",
+  mapType: serviceSetting.mapType || 'satellite',
 });
 
 const toService = (setting: Setting): ServeSetting => ({
@@ -40,6 +43,7 @@ const toService = (setting: Setting): ServeSetting => ({
   pose: setting.pose && JSON.stringify(setting.pose),
   cover: setting.cover,
   back: setting.back,
+  mapType: setting.mapType,
 });
 
 export const fetchSetting = async () => {

+ 3 - 0
src/sdk/association/setting.ts

@@ -7,6 +7,9 @@ export const associationSetting = (sdk: SDK, mountEl: HTMLDivElement) => {
   watchEffect(() => {
     setting.value?.fov && sdk.setCameraFov(setting.value.fov);
   });
+  watchEffect(() => {
+    setting.value?.mapType && sdk.switchMapType && sdk.switchMapType(setting.value.mapType);
+  });
   sdk.hideGrid()
 
   const stopWatchPose = watchEffect(() => {

+ 2 - 0
src/store/path.ts

@@ -30,6 +30,8 @@ export const getPath = (id: Path['id']) => paths.value.find(path => path.id ===
 
 export const getPathIsShow = (path: Path) => {
   if (!custom.showPaths && custom.showPath !== path.id) return false;
+
+  return true;
   const modelIds = path.points.map(item => item.modelId)
   if (path.linePosition?.modelId) {
     modelIds.push(path.linePosition.modelId)