I am involved in a bigger university mobile application project and my task is to design and develop a mobile module regarding map and location-based services in a native Android application.

Shortly my part of app should display different kind of info on a georeferenced map (Google Map or Openstreetmap) based on Oracle data:

  • Shortest path to reach a certain event from a certain location
  • Different layers with domain information to the event (like parking places around it, bus lines ecc. )
  • GetFeatureInfo option

I am new in this kind of topic and I would like to ask you an architectural question regarding it.

I thought about using Geoserver to define layers, styles, datasets etc., and WMS protocol to generate the map over a website using HTML 5, OpenLayers, and jQuery-mobile.

But how can I accomplish this in a native android app?

Building a webpage where I display the map using HTML 5, OpenLayers and jQuery-mobile to interact with Geoserver and then using the Webviews in Android to display the webpage in my app? Would be this a possible solution? Possible drawbacks?

What are the alternatives using Geoserver?

4 Answers 4


You may want to check out our university (University of South Florida)'s "OpenTripPlanner for Android" open-source project:


This is a native Android app that uses a REST API to access the main server-side open-source OpenTripPlanner project (created primarly by TriMet in Portland and OpenPlans), which does the actual multimodal (bike/transit/walk) trip planning:


The planned trip is then passed back to the Android app and displayed on the screen.

This is a slightly different server-side approach that's entirely implemented in Java and runs in a Java application server such as Tomcat, instead of utilizing a spatial database server such as Oracle spatial.

There are two steps to getting a running server:

  1. Use the OTP GraphBuilder application to build a graph object (a file) from several data sources (inclduing OpenStreetMap) that contains a serialized set of Java objects that represent the graph topology and rules for traversing the graph.
  2. Start the Tomcat server, which loads the graph object from disk into memory, deserializes the graph, and is then ready to serve trip planning requests.

There are performance/scalability benefits of having the entire graph in memory for routing, instead of having to hit a hard disk where the Oracle database is presumably located. I don't know if Oracle is a hard requirement for your project, but if not you might want to consider basing your application off of OpenTripPlanner (OTP).

The OTP Android app is available on Google Play:


And here's our OpenTripPlanner server instance running in Tampa, FL, that it sends the REST requests to (this is the normal web browser view):


Here's a sample REST API request that would be sent from the app to the server (note the "/opentripplanner-api-webapp/" addition to the below URL to give you the REST API instead of the normal web interface). If you open this in your browser, you should see the XML-encoded trip planned from the lat/long "fromPlace" to the lat/long "toPlace" encoded in the URL:


Here's the defintion of the OTP REST API that will tell you what each XML element in the response means:



It sounds like you've already got your stack figured out GeoServer/OpenLayers. I would also take a look at Leaflet for mobile, I think the support is a little more mature.

For making a native app, as you're using JavaScript libraries for the client like OpenLayers or Leaflet, you should look to utilize a mobile dev platform like PhoneGap (http://phonegap.com/) or Titanium (http://www.appcelerator.com/), they will allow you to code in HTML/JS/CSS and then compile to a native app.


A lot of this has already been solved (see osmdroid project). Perhaps that can provide a better framework for a "native" application.


For a native mapping app you could also consider Mapsforge. The overlays provided can be easily extended to implement WFS and WMS over the OSM base maps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.