Android 中的 Rhodes MapView 不显示注释
来自关键跟踪器中的此票证: https://www.pivotaltracker.com/story/show/3545405< /a>
这个功能是 6 个月前实现的,但我似乎无法使注释工作或找到任何人这样做。
任何人都知道如何使其工作,或者至少能够在单击某个点时在同一张地图内显示某种信息?
这是我的代码:
@allpoi = Poi.find(:all)
pois = []
@allpoi.each do |poi|
pois << { :latitude => poi.lat,
:longitude => poi.long,
:subtitle => "Go to punto",
:title => poi.name,
:url => "/app/Poi/{#{poi.object}}" }
end
map_params = {
:settings => {:map_type => "roadmap",:region =>['-33.425327','-70.604891', 0.04, 0.04],
:zoom_enabled => true,:scroll_enabled => true,:shows_user_location => false,
:api_key => 'MY_GOOGLE_API_KEY'},
:annotations => pois
}
MapView.create map_params
redirect :controller => :Poi, :action => :index
提前谢谢您
From this ticket in pivotal tracker: https://www.pivotaltracker.com/story/show/3545405
This feature was implemented 6 months ago, but I can't seem to make the annotations work or find anyone that has done so.
Anyone knows how to make it work or at least be able to show some sort of information inside the same map when clicking over a point?
This is the code I have:
@allpoi = Poi.find(:all)
pois = []
@allpoi.each do |poi|
pois << { :latitude => poi.lat,
:longitude => poi.long,
:subtitle => "Go to punto",
:title => poi.name,
:url => "/app/Poi/{#{poi.object}}" }
end
map_params = {
:settings => {:map_type => "roadmap",:region =>['-33.425327','-70.604891', 0.04, 0.04],
:zoom_enabled => true,:scroll_enabled => true,:shows_user_location => false,
:api_key => 'MY_GOOGLE_API_KEY'},
:annotations => pois
}
MapView.create map_params
redirect :controller => :Poi, :action => :index
Thank you in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Android中的注解只能添加到工作master分支上。它不适用于当前发布的 Rhodes 3.1 版本。
如果您尝试使用 master 分支版本的示例应用,您将能够看到额外的功能。
可以按照这些说明安装源代码
The annotations in Android can only be added on the working master branch. It does not work on the current release version of Rhodes 3.1.
If you try the example app with the master branch version you will be able to see the extra features.
The source code can be installed following these instructions