@mapcatch/util 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mapcatch/util",
3
- "version": "1.0.5",
4
- "main": "./dist/catchUtil.min.js",
3
+ "version": "1.0.6",
4
+ "main": "./dist/catchUtil.min.esm.js",
5
5
  "repository": "",
6
6
  "author": "wanyanyan",
7
7
  "license": "MIT",
package/src/util.js CHANGED
@@ -35,7 +35,7 @@ export async function getPhotoInfo(file) { // 获取照片的经纬度
35
35
  let sliceFile = file.slice(0, 65536)
36
36
  sliceFile.name = file.name
37
37
  let exif = await getPhotoTags(sliceFile)
38
- let {GPSAltitude, GPSLatitude, GPSLatitudeRef, GPSLongitude, GPSLongitudeRef, DateTimeOriginal, Model} = exif
38
+ let {GPSAltitude, GPSLatitude, GPSLatitudeRef, GPSLongitude, GPSLongitudeRef, DateTimeOriginal, Model, PixelXDimension, PixelYDimension} = exif
39
39
  if (!GPSLongitude || !GPSLatitude) {
40
40
  return {}
41
41
  }
@@ -43,6 +43,8 @@ export async function getPhotoInfo(file) { // 获取照片的经纬度
43
43
  return {
44
44
  date,
45
45
  Model,
46
+ width: PixelXDimension,
47
+ height: PixelYDimension,
46
48
  position: {
47
49
  lng: getGeoCoordOperator(GPSLongitudeRef) * toRadian(GPSLongitude),
48
50
  lat: getGeoCoordOperator(GPSLatitudeRef) * toRadian(GPSLatitude),