Hi
I have Drupal 6.13, Mappingkit 6.x-1.5 and OpenLayers 2.7 installed and working.
I can make maps and show GPX tracks.
Now I trying to use different symbols for different type of waypoints on single GPX track based on "sym" GPX tag. I want to get the string from "sym" tag and use it for symbol image name.

For example:

<wpt lat="42.7777805" lon="25.1638941">
  <ele>1402.000000</ele>
  <time>2009-08-10T07:16:16Z</time>
  <name>Korita - Voda</name>
  <sym>Drinking Water</sym>
</wpt>

get "sym" string "Drinking Water" and use it for the waypoint image name "Drinking Water.png"

I'm not so familiar with Drupal, Mappingkit and Openlayers and for now I don't have success.
Please point me witch files I should look to find how waypoints is displayed and what is the best way to get "sym" tag string.

Best regards
TheCH0SEN

Comments

tsfftf’s picture

do you mind explaining how you got the waypoints working? i'm sorry to steal your thunder with this thread but i'm having trouble with gpx files. Do you absolutely need the PostgreSQL db to do it? i've edited the settings.php file to support two databases but now i get an error when i save the settings in the geodata module:

Fatal error: Cannot redeclare db_status_report() (previously declared in ... includes/database.mysql.inc:20)

TheCH0SEN’s picture

I don't use PostgreSQL.
With MySQL track and waypoints visualization from GPX file is working.
But I don't use geodata module, for this module PostgreSQL with PostGIS is required.

I use Openlayers map client for examples - http://aardbodem.nl/?q=node/37

You can get some helpful info form here: http://aardbodem.nl/?q=node/8

TheCH0SEN’s picture

Update:
After some try I think I found the code that parse and display waypoints - OpenLayers-2.7.Format.GPX.js
I can get the "sym" tag value and try to use it for waypoint image name with waypointStyle.externalGraphic but is seems that only the last value is used for all waypoints.
I found on OpenLayer documentation advance styling methods and I will try.

tsfftf’s picture

thanks for the response, i got this working referencing the gpx files on a mysql setup. (after fiddling around with postgresql and postgis, long story). couldn't actually install the module on a postgresql drupal setup though. am i right in thinking that the geodata module just allows you to upload the gpx files through drupal and store them in the db instead of on the file system?

a good module regardless of the probs i encountered, well done jp.

jpulles’s picture

Sorry for the very (& too) late response.
The geodata module has nothing to do with gpx files; it can be used e.g. to import shapefiles into postgresql/postgis.
The current dev release support using a field value as an icon, but i didn't try this with gpx files. And in your case the field doesn't contain a graphic file name, since the file type is missing.