Calling a javascript function from a form item ajax callback?
PHP:

$commands[] = ajax_command_alert("Here!");
$commands[] = array(
  "command" =&gt; 'your_custom_command',
  "latitude" =&gt; "45.23",
  "longitude" =&gt; "23.25"
);


Javascript:

Drupal.ajax.prototype.commands.your_custom_command = function(ajax, response, status) {
  if( response.latitude != "" ) {
    // do something
  }
};