【发布时间】:2015-07-25 16:17:52
【问题描述】:
我正在关注此线程 Get coordinates from photo with JavaScript 以从图片中获取纬度和经度(我检查了图片并具有属性),我正在尝试使用 javascript 获取:
$(function(){
$("#file-input").on("change", function(e) {
EXIF.getData(e.target.files[0], function() {
var result = EXIF.pretty(this);
$("#span").text(result);
});
});
});
<script src="https://raw.githubusercontent.com/exif-js/exif-js/master/exif.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<input type="file" id="file-input" />
<span id="span">Here</span>
但它总是返回 GPSLatitude 和 LGPSLongitud: [3 values] 但我无法访问这些属性。
【问题讨论】:
标签: javascript exif