简体   繁体   中英

Creat and send SVG by telegram bot

I need creat seats map and send it by telegram bot(node.js) I have JSON with cordinates like this

            "hallid": "200",
            "hallName": "Hall 3",
            "width": 561,
            "height": 499,
            "widthScreen": 1024,
            "heightScreen": 768,
            "horizontalRatio": 2,
            "verticalRatio": 2,
            "seats": [
                {
                    "x": 144,
                    "y": 288,
                    "width": 21,
                    "height": 57,
                    "id": "D00001",
                    "row": "D",
                    "seat": "1",
                    "idSector": "000000308",
                    "idTypeOfSeat": "001"
                },
     {
                    "x": 320,
                    "y": 288,
                    "width": 21,
                    "height": 57,
                    "id": "D00007",
                    "row": "D",
                    "seat": "7",
                    "idSector": "000000308",
                    "idTypeOfSeat": "001"
                }...

            ]
        },

I've try do it like in frontend, but it doesn't work.

The Telegram client can't display SVG images. If you want the image to be visible in the client, convert it to a supported format: JPEG, PNG, or WebM.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM