Download & Extend

Adding track to gmap view?

Project:Trackfield
Version:6.x-1.0
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hi,

I have successfully installed Trackfield, and am able to create a node with a track on the map. However the node is also assigned a location, and I was hoping to display the location marker and track on the same map. Is this possible? Can it be done by creating a view?

Thanks,
Mikkel

Comments

#1

Subscribe...also curious about how to do this.

#2

Lostmonkey, I kind of figured out a solution. It isn't pretty and requires some programming, but it appears to work. For my purposes, I will only ever have one track on the map at once...so you will need to modify it if you want to have a bunch.

In summary, I am using hook_gmap() to intercept the map array before it goes to Views. Unfortunately, there is some bugs with hook_gmap(), so you actually have to have a ton of code in the hook...kinda stupid (ya..and took me hours to figure out). Anyway, I add the track/shape from the hook. I plan to make a CCK field where lat/lon points can be inputted (KML, or whatever) and then are processed with the PHP to get the lat/lon for each point.

This isn't a pretty solution and requires a lot of custom coding, but it does work.

See attached file...(note the "CUSTOM CODE" comments). Hope this helps.

AttachmentSize
test.zip 3.51 KB
nobody click here