[DUG-TO] GMAP, Location & CCK

Shah Husain husainsn at rogers.com
Wed Feb 3 16:50:23 EST 2010


GMAP, Location & CCK

Hello
I have a node type with location data. I want to access latitude and longitude data to calculate Sunrise time in a computed field on the same node - but no success. The code in computed field is:

$lat = $node->$location[latitude];
$long = $node->$location[longitude];
$node_field[0]['value'] = date_sunrise(time(), SUNFUNCS_RET_STRING, $lat, $long, 90, -5);

I can access latitude data $location[latitude] in the theme override, and can calculate sunrise. I want to use the computed field in a View.

Any help will be appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openject.com/pipermail/dug-to/attachments/20100203/19a03a61/attachment.htm>


More information about the DUG-TO mailing list