Posted by -enzo- on October 14, 2008 at 1:23am
Hello Folks
I build a new site to enable people to request or offer rides in Costa Rica, ride.alapar.net I've a custom content type to store rides, but I'm wondering if it's possible to add a map to enable users to draw a simple route ( lines) and store in database, in this way people could check if a ride is accurate for him/her.
Best regards
enzo

Comments
Trackfield
Hi,
You can use trackfield for this:
http://drupal.org/project/trackfield
An example from NoBMoB:
http://nobmob.com/node/5931
This is a standard content type which happens to have a CCK 'trackfield' field. Then for display it has a trackfield map, graph and number of stats that are all derived from the entered route.
On NoBMoB, these 'track' content types are grouped in a 'ride area', so we can have a view that shows all trails in a specific area, like this:
http://nobmob.com/node/5917/tracks
You can also get KML generated for such a view, like this (see this just loads the KML generated into Google maps):
http://maps.google.com.au/?q=http://nobmob.com/node/5917/kml
Is that what you meant?
Although trackfield is still early in development it's been working quiet nicely for us (and I do know a few other sites too) for a while now.
Hope this helps,
Rob
Problem using Trackfield
Hello raintonr
I download and I'm trying to create a Track Map, but when this cck field request me a "Reference Field Name" and I get this error
You must specify the reference field of type track.
Could you write a little readme about how use track map to draw a route in a node.
Thanks for your help
enzo - Eduardo Garcia
enzo - Eduardo Garcia
Doco updated
Have updated the doco and added a 'quickstart' section here:
http://drupal.org/node/274516
Hope this helps.
It's working, but is a little trick
Hello Raintonr
Thanks for you explanation, all works as you said, but I have couple question
Track data field is enable in add/edition and you could choose how treat data I understand the Latitude, Longitude and Altitude options, but what does USR mean?
I guess this a little geek way to store information, I'm thinking in a easy way to draw the route using a cursor, I want enable my service for regular people, sometimes without computer knowledge, do you have any approach on this way, I could help you if you have any advance in this direction.
Best regards.
enzo
P.S track_cvs.modulo have a error in line 192, I resolve mix lines 191 and 192 and remove a character \, maybe is a error in cvs file.
enzo - Eduardo Garcia
enzo - Eduardo Garcia
USR
'USR' refers to USR data. The idea is that in the end you will be able to put any number of fields and use them for whatever you like.
Ie. a cyclist might like to record cadence, power, time, etc.
In the latest trackfield_crs for example, these are used and heartrate, cadence and time are all stored.
The idea is these will be user definable or site configurable after time.
As for the drawing thing... there are many, many sites online for drawing routes so I didn't want to re-invent them. I like to draw paths on Google Earth and then just copy/paste the KML into my Drupal site. Works very well.
The bug you refer to has been closed:
http://drupal.org/node/313731
I am wondering if is is
I am wondering if is is possible to use only the Location module for this? Locations allows for multiple locations to be stored for a node. I am just not sure how to make GMap use those to raw lines between them???
Trackfield is not available for Drupal 6 yet and it will take some time for this to happen so a Location-only solution will be best for me.
D6 Trackfield
I'm working on D6 Trackfield, but am a bit held up by lack of doco for D6 CCK :(
See here: http://drupal.org/node/247932
Anyhow - if someone wants to see this progress and knows a bit about D6 CCK would love to hear from them! :)
As for the location only thing? Hmmmm... I'm guessing you might have some luck with themeing GMAP but haven't looked into that possibility.
D6 Trackfield
Ah... all sorted. There's a dev. release of Trackfield now if anyone wants to try it.
Thanks, but I don't see the
Thanks, but I don't see the dev release on the project page. The last version I saw was 6.x-0.5 (Oct 29)
Dev for 6.x
Ah... here you go:
http://drupal.org/node/330668
Give it a while to populate though.
Just tried that version. I
Just tried that version. I added a new field of type Track to my content type, then tried to add a field of type Track Map, hit Save and got the following error message:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL DEFAULT 'TRUE'' at line 1 query: ALTER TABLE content_type_test ADDfield_track_map_dummyNOT NULL DEFAULT 'TRUE' in /home/newnomad/public_html/includes/database.mysql-common.inc on line 298.Wrong version
Doh! What's going on here? This is the wrong version of the code.
This comes from my lack of understanding of how Drupal/CVS interact. I created a branch point for D6 in CVS but it won't let me tag anything with
DRUPAL-6--1:(Look here - you'll see what I mean:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/trackfield/...
OK, I'll be checking the
OK, I'll be checking the module home page and wait for the packaged update. Thanks for the quick reaction!
Just checking back: do you
Just checking back: do you plan to release a new version on the module home page. The one there is still from Oct 29. Or if not there, where can find the updated packaged module?
CVS?
Hmmm... I wasn't going to make a release until the webmasters fix up my silly release problem :(
Don't suppose you can get these from CVS in the mean time? You could just wget them if you don't fancy messing with CVS itself:
wget http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/trackfield/trackfield.module?revision=1.10wget http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/trackfield/trackfield_map.module?revision=1.9wget http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/trackfield/trackfield_graph.module?revision=1.8wget http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/trackfield/trackfield_stats.module?revision=1.7Sorry, I haven't had much time to test this thoroughly... if you can confirm this is working that would be a great help :)
Ooooops! I used the links
Ooooops! I used the links above to override the packaged module files and I don't get an error anymore but... when I try to create a new node with a trackfield in it, all I get is a text field to drop some coordinates into. In fact I was looking for a functionality similar to that of Location module, where you have a clickable google map to select your coordinates from (ton type them in). Is there such an option for trackfield?
Maybe
So you want a clickable map like Google maps 'My Maps' has? And GPSies and a whole load of other sites?
Sorry, but although someone could probably write an extension like that I don't plan to. What I do is use Google Earth (or one of the sites just mentioned) to draw lines then copy/paste the KML (or GPX export or whatever) into the trackfield and there you go.
This was meant to be a co-ordinate storage system, not a map builder like you want.
No worries, thanks for your
No worries, thanks for your help.
I was looking for something that combines the Location module (it already has the clickable map) and trackfield. In fact Location supports multiple locations (latitude+longitude) per node but apparently it cannot connect those locations visually on the map.
Use GMap Macro builder
From the GMap module readme.txt: