Anybody used MapView with ruboto?

79 views
Skip to first unread message

donV

unread,
Apr 29, 2011, 7:52:15 AM4/29/11
to Ruboto (JRuby on Android)
Hi all!

I am trying to make a simple tracker with map display.

I have looked at using MapView, but it requires a MapActivity instead
of a regular Activity. Anybody got a tip on how to do this?

donV

unread,
Apr 29, 2011, 9:10:42 AM4/29/11
to Ruboto (JRuby on Android)
Success! I have successfully displayed a MapView with ruboto!

One downside is that I had to change the superclass of RubotoActivity
to com.google.android.maps.MapActivity to get it working, which is
fine for a proof of concept, but we should offer a way to do this
better.

Scott

unread,
Apr 29, 2011, 1:17:39 PM4/29/11
to Ruboto (JRuby on Android)
We do generate a few other Activities (TabActivity and
PreferencesActivity), but we have the xml data for them. I looked but
never found a xml specification for Google's proprietary APIs. That
means we have to either:

1) Generate an activity subclass, and make changes to it by hand.

2) Generate our own version of the xml data through reflection.

3) Just generate the subclass through reflection.

The main problem with the last two is that we can only look at one API
level at a time. It's doable, but it would take a decent amount of
work (e.g., generating our own xml for each level).

I would say go with #1 for now...until someone wants to invest the
time into #2.

donV

unread,
Sep 3, 2012, 7:11:48 AM9/3/12
to rub...@googlegroups.com
On Saturday, August 18, 2012 3:56:14 PM UTC+2, Ethan Stryker wrote:
I realize this thread is pretty old, but I too am interested in creating a mapping app with Ruboto.  What kind of changes would someone have to make to an activity subclass to get this to work? Has anyone done this already?

Make your Java activity class subclass the Google MapActivity, and then follow any Android Map activity example.  I will probably make a tutorial/example for this for the october release, but if you get any way with this, please add an example/tutorial to the wiki yourself.

Hristo Kochev

unread,
Aug 13, 2014, 10:18:01 AM8/13/14
to rub...@googlegroups.com
Hello,

I would like to make a tutorial entry for my map application and share my expirience, but currently I into this point during compilation :

20140813 165410.565000 E/AndroidRuntime( 9219): FATAL EXCEPTION: ScriptLoader for Java::OrgRubotoMap::Main
20140813 165410.566000 E/AndroidRuntime( 9219): org.jruby.embed.EvalFailedException: (NameError) cannot load Java class com.google.android.gms.maps.*

this come from this lines 

require 'ruboto/widget'
# require 'ruboto/util/toast'

ruboto_import_widgets :LinearLayout, :FrameLayout
import 'com.google.android.gms.maps.*'
import 'com.google.android.gms.maps.model.*'

What I'm doing wrong ?

Hristo Kochev

unread,
Aug 13, 2014, 6:40:13 PM8/13/14
to rub...@googlegroups.com
Humm ...actully I did resolve the issue with including com.google.gms.map.

Uwe Kubosch

unread,
Oct 13, 2014, 3:45:39 PM10/13/14
to rub...@googlegroups.com
Excellent Hristo!

Have you shared the MapView example anywhere?


On 2014-08-14, at 00:40, Hristo Kochev <h.l.k...@gmail.com> wrote:

> Humm ...actully I did resolve the issue with including com.google.gms.map.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruboto (JRuby on Android)" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ruboto+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
Uwe Kubosch
u...@kubosch.no
http://kubosch.no/




Reply all
Reply to author
Forward
0 new messages