importing TCX/GPX/KML for display on maps?

Events happening in the community are now at Drupal community events on www.drupal.org.
avolve's picture

I was hoping some of you could provide some advice.

I am looking for an approach to displaying data from a TCX, GPX or KML file on a (non Google) map on a node. The data will be sourced from the Garmin connect service (export, import)

My first thoughts were user would upload the file on node creation, which would then be displayed on a map when the node is viewed (or on upload if possible?).

Unfortunately, I have yet to find what I was hoping would be a relatively straightforward means to achieve this.

Any recommendations?

Thanks.
c

Comments

You need Geocoder

Sinan Erdem's picture

You need Geocoder (http://drupal.org/project/geocoder) module. This module can take KML data (or some other supported types) from one field and can populate a Geofield (http://drupal.org/project/geofield). Then, you can use the data in geofield on a map (Openlayers or Leaflet).

Thanks Sinan, I recreated my

avolve's picture

Thanks Sinan,

I recreated my past attempt, and still get a similar result. This time i tried a GPX file.

The Leaflet map displays, with no map (i.e. grey). I have read through the issue queue, and it appears others have similar results — no mapping information, no text references aside from leaflet in the bottom right.

Next is to work out if the information is not being coded by geophp, or leaflet is not pulling in that information (or if being on a local MAMP install is an issue).

Are you using Geocoder? If

Sinan Erdem's picture

Are you using Geocoder? If you are, then you can first check if you successfully geocode the file into geofield. After that, putting the information to Leaflet is the easy part.

Perseverance pays off

avolve's picture

I uninstalled all of the modules for the third time and went through the set-up and configuration process again.

This time, I got it all working.

Thanks.

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: