function prettifyCoordinates(longitude, latitude, options) {
  const result = {
    latitude: "",
    longitude: "",
    elevation: ""
  };
  const { defaultValue, defined } = Cesium;
  const optionsDefaulted = defaultValue(options, {});
  const decimal = defaultValue(optionsDefaulted.decimal, 5);
  if (optionsDefaulted.rangeType === 0) {
    result.latitude = Math.abs(latitude).toFixed(decimal) + "\xB0" + (latitude < 0 ? "S" : "N");
    result.longitude = Math.abs(longitude).toFixed(decimal) + "\xB0" + (longitude < 0 ? "W" : "E");
  } else if (optionsDefaulted.rangeType === 1) {
    result.latitude = latitude.toFixed(decimal) + "\xB0";
    result.longitude = longitude.toFixed(decimal) + "\xB0";
  } else if (optionsDefaulted.rangeType === 2) {
    result.latitude = latitude.toFixed(decimal) + "\xB0";
    result.longitude = (longitude < 0 ? 360 + longitude : longitude).toFixed(decimal) + "\xB0";
  }
  if (defined(optionsDefaulted.height)) {
    result.elevation = Math.round(optionsDefaulted.height) + (defined(optionsDefaulted.errorBar) ? "\xB1" + Math.round(optionsDefaulted.errorBar) : "") + "m";
  } else {
    result.elevation = "";
  }
  return result;
}

export { prettifyCoordinates as default };
//# sourceMappingURL=prettifyCoordinates.mjs.map
