简体   繁体   English

通过电报机器人创建和发送SVG

[英]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 我需要创建座位图并通过电报bot(node.js)发送给我,我的JSON具有这样的坐标

            "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. Telegram客户端无法显示SVG图像。 If you want the image to be visible in the client, convert it to a supported format: JPEG, PNG, or WebM. 如果您希望图像在客户端中可见,请将其转换为受支持的格式:JPEG,PNG或WebM。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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