Projekt

Obecné

Profil

Stáhnout (1.22 KB) Statistiky
| Větev: | Tag: | Revize:
1
import { VStack, Box, Text, HStack, ScrollView, Flex, Button, CloseIcon, IconButton, TextArea, useToast } from "native-base";
2
import { Note } from "../../types/note";
3
import React, { useCallback, useState } from "react";
4
import { Floor, PlanImage, Room } from "../../types/plan";
5

    
6
import MapView, { Marker } from 'react-native-maps';
7
import Svg, { Image, SvgXml } from 'react-native-svg';
8
import SvgImage from "react-native-svg/lib/typescript/elements/Image";
9

    
10
const CastlePlanView = (props: { mapImage: PlanImage, selectedRoom?: Room }) => {
11

    
12
    const { mapImage, selectedRoom } = props
13

    
14
    console.log(mapImage.svg.substring(0, 500))
15

    
16
    console.log(selectedRoom?.kx, selectedRoom?.ky, selectedRoom?.svg_path)
17

    
18
    console.log(mapImage.viewBox)
19

    
20
    return (
21
        <Box>
22
            {/* Display the background image */}
23
            <SvgXml
24
                xml={mapImage.svg}
25
                height="300"
26

    
27
                preserveAspectRatio="xMidYMid meet"
28
            />
29

    
30
            {/* Display the MapView on top of the background image */}
31
            <MapView
32
                style={{ flex: 1 }}
33
            // Add other map-related props as needed
34
            >
35
            </MapView>
36
        </Box>
37
    );
38
}
39

    
40
export default CastlePlanView
    (1-1/1)