Monday, June 2, 2014

Maply Android Preview

I've been hard at work on Maply for Android.  It's come along nicely and now there's something to show.

I'm not tired of that dorky Android icon yet, but that day will come.

Where to Get It


The neat thing about Android is you can install whatever you like on your device.  As an iOS developer that feels incredibly illicit.  So here's the MaplyTester app.  It shows off image and vector tile paging.

The source code is checked in to the WhirlyGlobe-Maply tree under the develop_3_0 branch.  There's a MaplyAndroidTester app that uses the Maply library.  If you're an Android developer this probably makes sense to you.  If you're not, I'd hold off.  I'm not ready to support non-experts yet.

Documentation for Maply Android is also up there.

What's it Do?


You notice I'm just calling it Maply?  It doesn't do WhirlyGlobe.  Yet.  Won't be hard to turn that on, but that's going to be client driven.

Image maps are so pretty... and also much simpler.

The test app I put up makes use of vector tiles and image basemaps.  The core rendering engine is working, as is much of the high level interface.  This is the WhirlyGlobe-Maply 2.3 engine so it's got a lot of the newer, trickier stuff.  It isn't all exposed yet, though.  That will come.

I'm happy with the state it's in.  The rendering loop could use a bit of work, the gestures need some help, and the vector fetching could use some love.  But overall, it's in decent shape.

Can you crash it?  Of course you can.  If you're looking for the easy way, just switch between display modes real quick.  The threading cleanup is still buggy.  But that's not the point... the point is...

Android Development is Open For Business


Thanks to my initial client (who would like to remain nameless) the hard part is done.  Maply works on Android, WhirlyGlobe can follow and you can get it for cheap(ish).  Trust me, this was a lot of work, whatever you need isn't going to be as big.

If you've got an app that needs a fast, cross platform map toolkit, let's talk.  You want the globe?  It's doable, let's talk.  Mapnik vector tiles?  Sure, we can port that over.  It's all possible now.

10 comments:

  1. Hi, I'm trying to use your lib for android like this:
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mMaplyController = new MaplyController(this);
    setContentView(mMaplyController.getContentView());
    }
    but it throws nex exception:
    FATAL EXCEPTION: main
    Process: com.example.whilrlyglobe, PID: 27066
    java.lang.UnsatisfiedLinkError: Native method not found: com.mousebird.maply.CoordSystemDisplayAdapter.nativeInit:()V
    at com.mousebird.maply.CoordSystemDisplayAdapter.nativeInit(Native Method)
    at com.mousebird.maply.CoordSystemDisplayAdapter.(CoordSystemDisplayAdapter.java:87)
    at com.mousebird.maply.MaplyController.(MaplyController.java:127)

    Androdi NDK project is built and libMaply.so is generated and placed in maply/libs/armeabi/ folder
    maply is marled as android library project and included to my test project.
    Could you please help me with this issue ?

    ReplyDelete
  2. It's a little hokey, but in my main activity I explicitly load the JNI library.
    System.loadLibrary("Maply");

    Make sure you do that before you try to create one.

    ReplyDelete
  3. Thanks now I can run my app but it says "This device does not support OpenGL ES 2.0." but I run it on Nexus 7 which definitely support.

    uses-feature android:glEsVersion="0x00020000" android:required="true"
    included to manifest file.

    ReplyDelete
  4. line 158 of MaplyController:
    final boolean supportsEs2 = configurationInfo.reqGlEsVersion > 0x20000 || isProbablyEmulator();
    which means that if it's rqual to 0x20000 it will no pass the test. You should change to ">= 0x20000"

    ReplyDelete
  5. Aha! I support OpenGL ES 3.0 now and I was testing on a 3.0 compatible device, I bet. But I still support 2.0 as well.

    That makes perfect sense. I'll fix this ASAP.

    ReplyDelete
  6. You should try it on 2.0 version because I cant see anything but white screen. Or maybe I missed some configurations ?

    ReplyDelete
  7. Hi, is this lib for Android include 3d globe?

    ReplyDelete
    Replies
    1. Nope, it's just Maply for the moment. I'm discussing the cost of porting the globe to Android with clients.

      If you want in on that, send me email and we can discuss.

      Delete