This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Display GPX file in Android application

0

Can anyone plz tell me how to load a .gpx file to my android application? I am using eclipse IDE, I have a osm map in my app, i want to integrate the .gpx file to this osm in the application plz help me

asked 14 Jan '15, 06:18

Mary%20Mathew's gravatar image

Mary Mathew
11224
accept rate: 0%

edited 14 Jan '15, 08:03

scai's gravatar image

scai ♦
33.3k21309459

2

This depends on the framework(s) you are using. Can you give us more details about your application?

(14 Jan '15, 07:57) scai ♦

sir, i'm developing a taxi app where im using an osm map i want t0 integrate .gpx file containing tracks and POI's .My app is android app im using eclipse juno and jars osmdroid4.2 and sl4j 1.5.8.

i want to integrate this .gpx file inside my eclipse code.

plz do help me sir

(14 Jan '15, 08:11) Mary Mathew

One Answer:

0

Since you are using osmdroid take a look at the osmbonuspack. I'm not familiar with osmbonuspack (nor with osmdroid) but Tutorial 1 describes the steps for displaying a route.

answered 14 Jan '15, 09:10

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

But sir i clearly mentioned i want to add or integrate the .gpx file. The tutorial 1 dosent mention anything about .gpx file

(14 Jan '15, 09:20) Mary Mathew

That's correct, as far as I can tell osmdroid + osmbonuspack don't support GPX files directly. But with a little parsing you can extract the coordinates from the GPX file and build the polylines yourself.

(14 Jan '15, 09:54) scai ♦

Source code available on GitHub .