[DUG-TO] GMAP, Location & CCK

Trevor Twining trevortwining at gmail.com
Wed Feb 3 17:25:16 EST 2010


Not sure if this is just a typo in the example you're using for us, but try changing

$node->$location[latitude];

to 

$node->location[latitude];

That might solve the problem.


On 2010-02-03, at 4:50 PM, Shah Husain wrote:

> 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.
> 
> _______________________________________________
> DUG-TO mailing list
> DUG-TO at lists.openject.com
> http://lists.openject.com/listinfo/dug-to



Trevor Twining,
Senior Web Developer
Points of Light Institute
http://pointsoflight.org
skype/aim/gtalk: trevortwining

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


More information about the DUG-TO mailing list