map组件如何展示marker的callout气泡
场景描述
marker 可以通过点击或者常显的方式显示一个文本为用来描述和对应 marker 相关的信息。
实现思路
如下示例展示了在对应的 marker 上展示常显文本气泡。
由于文本气泡是无法自定义宽高的,即气泡根据文本内容自适应宽高,那么也就说明textAlign属性,只有文本内容中包含换行符("\n")的时候,才会有直观的可视效果。
解决方法
代码如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
更多参考
Map组件:
https://developer.huawei.com/consumer/cn/doc/development/quickApp-References/quickapp-component-map
原文链接:https://developer.huawei.com/...
原作者:Mayism
相关文章
- Java类集--Map接口、HashMap、IdentityHashMap、SortedMap
- ava:Map借口及其子类HashMap三
- [Javascript + rxjs] Using the map method with Observable
- MapReduce核心map reduce shuffle (spill sort partition merge)详解
- [Functional Programming 101] Crocks.js -- when to use map and when to use chain?
- 由MAP而起
- ES6学习之路9----Map数据结构
- 微信小程序----map组件实现(高德地图API实现wx.chooseLocation(OBJECT))
- 【Groovy】json 字符串反序列化 ( 使用 JsonSlurper 进行 json 字符串反序列化 | 根据 map 集合构造相关类 )
- HDU-4879-ZCC loves march(map+set+并查集)
- springMVC在JSP页面取map值
- Map生成器 map适配器如今能够使用各种不同的Generator,iterator和常量值的组合来填充Map初始化对象
- Day 20 - 重新检视 mAP, F1, IoU, Precision-Recall 精准度
- Dart基础第6篇:集合类型List Set Map详解 以及循环语句 forEach map where any every
- 全功能药效团图谱(Full-feature pharmacophore map)是什么?怎么绘制?