Titanium - 自定义地图注释气泡?
Appcelerator Titanium 有没有办法自定义地图注释气泡?具体来说,我希望它们能够显示比它们显示的更多的文本(理想情况下,通过扩展以适合文本)。我知道我可以使它们可点击并将用户带到包含更多信息的页面,但我根本没有足够的信息来保证这一点。基本上只是标题文本太长(而且我无法更改文本本身,它来自我无法控制的来源)。
或者(如果没有自定义选项),是否有一种简单的方法来自定义气泡?我真的不想重新发明轮子并重写引脚本身及其事件处理程序,但如果归根结底(有人可以向我指出一些可以让我开始的代码,因为我知道是否需要它) ,有人做到了),那就这样吧。
iPhone 特有的选项很好。
Is there any way to customize the map annotation bubbles in Appcelerator Titanium? Specifically, I'd like them to be able to display more text than what they show (ideally, by expanding to fit the text). I know I can make them clickable and take the user to a page with more info, but I simply don't have enough information to warrant that. It's basically just the title text is too long (and I can't change the text itself, it comes from sources I have no control over).
Alternatively (if customizing what's there isn't an option), is there an easy way to do custom bubbles? I don't really want to have to reinvent the wheel and rewrite the pins themselves and their event handlers, but if it comes down to it (and someone can point me to some code that can get me started, since I know if it's required, someone's done it), then so be it.
iPhone-specific options are fine.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目前,最新的 Titanium SDK 为您提供了注释气泡定制的可能性:
请在此处了解更多信息。
如果这足以完成您的任务 - 您可以使用它。但为了进行更深入的自定义,您必须创建自己的视图并将其显示在注释单击事件上。
At this moment the latest Titanium SDK gives you such possibilities for annotation bubble customization:
Read more here.
If this is enough for your task - you can use it. But for deeper customization you must create your own view and show it on annotation click event.