$node object not populating with data
I am not sure this can help you, but I don't think $node-&gt;field-address or $node-&gt;field-longitude-temp are valid syntax by $node object, you should use $node-&gt;field_address['und'][0]['value'] or with entity_metadata_wrapper function, eg:

$nodeWrapper = entity_metadata_wrapper('node', $node);
$nodeWrapper-&gt;field_address-&gt;value()