Hi, attention Newbie

I´m trying to modify the trackfield.module to work with views.
When I choose Openlayers as Style I can chosse Long/Lat als Datasource and have to asign a field for longitude and a field for latitude.

Therefore I inserted hook_views_api() and discriped the table via trackfield_views_data.
The trackfield_datasets table has the structure: nid,vid,field_name,delta,settype,setdata
So I got the settype and setdata (in the settype row is the type of the following data.(long, lat, acc, etc.)) in the view

But I need a field with the longitude data and a field with the latitude data for each nid.

I tried several things with handlers and additional fields with the views api but I can´t figure it out how to get these to seperated fields.

Does anyone understand my problem?

Comments

slcp’s picture

I would be interested to see your work on this...

I will be tackling this soon myself.

slcp’s picture

This is actually very easy! Seeing as I use gpx files for most of my tracks all I need to do is use Geofield to geocode from the File field on the node and use this as WKT data source in an Openlayers Data Overlay in Views.

A solution for trackfield data input via other means would be a WKT formatter for the Track field which is currently unformatted and expected to be hidden. A WKT formatter as default would provide an out of the box integration with a Views mapping solution. As far as I'm aware GMap does not take linestings in any form as input for a Views display so it does not really restrict usage to Openlayers any more than it does already.

sano’s picture

I would also like to see trackfield to play nice with the OL module. Consider this use case:

track planner:

User combines several track of segments stored as wkt linestrings into one, which then trackfield can use to draw elevation profile from.