当前位置:网站首页>微信小程序:点击按钮频繁切换,重叠自定义markers,但是值不改变
微信小程序:点击按钮频繁切换,重叠自定义markers,但是值不改变
2022-06-23 09:09:00 【Crazy_GirlLL】

背景:点击切换右侧对应的实况要素,改变marker下面的实况信息(-22.9℃),并且markers名字(尚志市)和实况信息(-22.9℃)并不是一个接口获取,此项目还使用了自定义的callout
自定义callout的例子在这:有需要自取https://blog.csdn.net/Crazy_GirlLL/article/details/113556336
结构如下

经大佬提示,自定义组件中的customMarkers虽然也是每次请求,但是里面的id是不变的,所以就会出现点击按钮,调取接口,数据也请求到,但是还未更新到customMarkers里面,,在每次点击按钮的时候,也就是请求新实况信息之前,就清空customMarkers里面的数据,这样就会强制渲染上
边栏推荐
- ionic5表单输入框和单选按钮
- [cloud native | kubernetes] kubernetes principle and installation (II)
- @Response
- Restore the default routing settings of the primary network card
- Leetcode topic analysis count primes
- Redis学习笔记—数据类型:集合(set)
- How postman does interface testing 1: how to import swagger interface documents
- How thingjs enables low threshold 3D visualization development
- 设CPU有16根地址线,8根数据线,并用MREQ作为访存控制线号......存储器与CPU的连接
- Redis learning notes - Database Management
猜你喜欢
随机推荐
栈(Stack)的链式实现详解----线性结构
Aiming at the overseas pet market, "grasshand" has developed an intelligent tracking product independent of mobile phones | early project
125. Valid Palindrome
MySQL故障案例 | ERROR 1071 (42000): Specified key was too long
MySQL fault case | mysqldump: couldn't execute 'select column_ NAME
一个采用直接映射方式的32KB缓存......存储器课后习题
Redis学习笔记—redis-benchmark详解
Zone d'entrée du formulaire ionic5 et boutons radio
Simple student management
Leetcode topic analysis contains duplicate III
297. Serialize and Deserialize Binary Tree
Redis learning notes - slow query analysis
Flink错误--Caused by: org.apache.calcite.sql.parser.SqlParseException: Encountered “time“
Redis学习笔记—主从复制
[QNX Hypervisor 2.2用户手册]6.2 网络
通用分页(1)
Redis学习笔记—持久化机制之AOF
【活动报名】SOFAStack × CSDN 联合举办开源系列 Meetup ,6 月 24 日火热开启
Typora设置图片上传服务
Quartz Crystal Drive Level Calculation








