Issue
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
Solution
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
Answered By - marimaf
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.