1
0

It helps if you know what direction the coordinates are referencing.

This commit is contained in:
rWatcher 2010-02-25 22:49:25 -05:00
parent f055accf85
commit 2efa2bebe7

View File

@ -51,6 +51,12 @@ class exif_gps_Core {
$record->item_id = $item->id;
$record->latitude = $keys["Latitude"];
$record->longitude = $keys["Longitude"];
if ($keys["Latitude Reference"] == "S") {
$record->latitude = "-" . $record->latitude;
}
if ($keys["Longitude Reference"] == "W") {
$record->longitude = "-" . $record->longitude;
}
$record->save();
}
}
@ -58,6 +64,8 @@ class exif_gps_Core {
private static function _keys() {
if (!isset(self::$exif_keys)) {
self::$exif_keys = array(
"Latitude Reference" => array("GPS", "Latitude Reference", t("GPS: Latitude Reference"), ),
"Longitude Reference" => array("GPS", "Longitude Reference", t("GPS: Longitude Reference"),),
"Latitude" => array("GPS", "Latitude", t("GPS: Latitude"), ),
"Longitude" => array("GPS", "Longitude", t("GPS: Longitude"), )
);