It's fine as is.
Personally I'd chain the ajax calls and outcomes:
- $.ajax({...}).
-
done(...).
-
fail(...);
You don't need quotes around object attribute names (unless
they contain funny characters or are reserved words.
- data:
{id: choice, phase: phaseFlag, ...}
You might extract the handling of the lat/long processing into a
common function.
Presumably the error handling will be improved.