[DAY14]地图与组图(1)

LocationSendMessage

location_message = LocationSendMessage(
    title='my location',
    address='Tokyo',
    latitude(纬度)=35.65910807942215,
    longitude(经度)=139.70372892916203
)

显示地图title跟address是我们打什麽就会显示什麽,而经纬度我们可以利用Google地图寻找
Location message
type
String Required
location
最多只能有100字
title
String Required
Title
Max character limit: 100
同上
address
String Required
Address
Max character limit: 100

latitude
Decimal Required
Latitude

longitude
Decimal Required
Longitude

ImagemapSendMessage

imagemap_message = ImagemapSendMessage(
    base_url='https://example.com/base',图片来源URL
    alt_text='this is an imagemap',副标题
    base_size=BaseSize(height=1040, width=1040),图片范围大小
    我们在图片中也可以放入影片
	video=Video(
        original_content_url='https://example.com/video.mp4',
        preview_image_url='https://example.com/video_preview.jpg',
        area=ImagemapArea(
            x=0, y=0, width=1040, height=585
        ),
        external_link=ExternalLink(
	影片点开後右上角会有一个小标签供点击
            link_uri='https://example.com/see_more.html',
            label='See More',
        ),
    ),
当图片按钮按下去後的动作
    actions=[
        URIImagemapAction(
            link_uri='https://example.com/',
            area=ImagemapArea(
                x=0, y=0, width=520, height=1040
            )
        ),
        MessageImagemapAction(
            text='hello',
            area=ImagemapArea(
                x=520, y=0, width=520, height=1040
            )
        )
    ]
)

明天会再讲的更详细一些
https://ithelp.ithome.com.tw/upload/images/20210928/20140159pRNptr54cf.jpg


<<:  Day 13 - Spring Boot & JPA

>>:  Day13 - 重构产品页面 API,使用 API routes - feat. MongoDB

[Day 13]每天前进一点应该也是进步吧?(後端篇)

挑战目标: MockNative Camp 今天来做教师的更新API,因为我没有实际看过教师更新的画...

图的储存结构 - 相邻矩阵 - DAY 20

储存边和弧是否存在 添加权重时的纪录状况 参考来源 大话资料结构 ...

[2021铁人赛 Day15] General Skills 12

引言 昨天使用到 strings 与 grep 这两个工具, 主要是用来寻找一堆资料中的字串的。 ...

Day-9 重现於新电视的音速索尼克始祖、SEGA 的 MEGA DRIVE

我想就算没玩过游戏、应该也多少听过去年上映的音速小子电影、这是部由 SEGA 游戏音速小子(现译为索...

Day 03 Benefits and Constraints of Embedded Systems

Compare and contrast CPU, MCU, and embedded syste...