Android 中的 Rhodes MapView 不显示注释

发布于 2024-12-03 20:03:39 字数 954 浏览 5 评论 0原文

来自关键跟踪器中的此票证: 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

酒浓于脸红 2024-12-10 20:03:39

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文