maplibre / maplibre-native

MapLibre Native - Interactive vector tile maps for iOS, Android and other platforms.
https://maplibre.org
BSD 2-Clause "Simplified" License
1.05k stars 303 forks source link

Add `libwebp` for Decoding WebP raster tiles #58

Closed roblabs closed 1 year ago

roblabs commented 3 years ago

WebP is an open source image format that provides smaller file sizes and lossy & lossless formats.

{
  "version": 8,
  "name": "Joshua Tree National Park...in WebP",
  "center": [-115.746, 33.866],
  "zoom": 7,
  "sources": {
    "jotr": {
        "tiles": [ "asset://joshuatree/{z}/{x}/{y}.webp" ],
        "type": "raster"
    }
  },
  "layers": [
    {
      "id": "background",
      "type": "background",
      "paint": {
        "background-color": "#ddeeff"
      }
    },
    {
        "id": "jotr",
        "type": "raster",
        "source": "jotr",
        "layout": {},
        "paint": {}
    }
  ]
}

This work is donated by ePi Rational, Inc. based on work initially done by mapbox/mapbox-gl-native

And updated over several versions of the iOS SDK.


Example of WebP rasters in MapLibre for Joshua Tree National Park

roblabs commented 3 years ago

Test Results of Archive & upload to App Store Connect (TestFlight) of the MapLibre test app iosapp with MapLibre + WebP

Results Summary — the WebP SDK adds approximately 0.4 MB to the install size for iOS & iPadOS variants.

Key

Methodology

DEVICE TYPE DOWNLOAD SIZE INSTALL SIZE
This is the compressed size of the app downloaded over the air.1 This is the amount of disk space the app will take up on the customer's device. The install size also appears on your app’s product page in the Information section.1
Universal 1706 KB MapKit
11742 KB 🗺
12443 KB 🗺+🕸
---
🕸 adds an additional 701 KB
1924 KB MapKit
20146 KB 🗺
20904 KB 🗺+🕸
---
🕸 adds an additional 758 KB
iPad (6th generation)  6221 KB  🗺
6598 KB 🗺+🕸
---
🕸 adds an additional 377 KB
 14105 KB  🗺
14502 KB 🗺+🕸
---
🕸 adds an additional 397 KB
iPad Pro (11‑inch)  6220 KB  🗺
6597 KB 🗺+🕸
---
🕸 adds an additional 377 KB
 14100 KB  🗺
14498 KB 🗺+🕸
---
🕸 adds an additional 398 KB
iPad Pro (12.9‑inch) (4th generation)  2834 KB  🗺
3034 KB 🗺+🕸
---
🕸 adds an additional 200 KB
 14007 KB  🗺
14396 KB 🗺+🕸
---
🕸 adds an additional 389 KB
iPhone 5S  6216 KB  🗺
6594 KB 🗺+🕸
---
🕸 adds an additional 378 KB
 14096 KB  🗺
14494 KB 🗺+🕸
---
🕸 adds an additional 398 KB
iPhone 7 Plus  6225 KB  🗺
6603 KB 🗺+🕸
---
🕸 adds an additional 378 KB
 14105 KB  🗺
14502 KB 🗺+🕸
---
🕸 adds an additional 397 KB
iPhone 11 Pro Max  2839 KB  🗺
3038 KB 🗺+🕸
---
🕸 adds an additional 199 KB
 14011 KB  🗺
14401 KB 🗺+🕸
---
🕸 adds an additional 390 KB
iPhone SE (2nd generation)  2830 KB  🗺
3029 KB 🗺+🕸
---
🕸 adds an additional 199 KB
 14003 KB  🗺
14392 KB 🗺+🕸
---
🕸 adds an additional 389 KB
iPhone 12 mini  2839 KB  🗺
3038 KB 🗺+🕸
---
🕸 adds an additional 199 KB
 14011 KB  🗺
14401 KB 🗺+🕸
---
🕸 adds an additional 390 KB
iPhone 12 Pro Max  2839 KB  🗺
3038 KB 🗺+🕸
---
🕸 adds an additional 199 KB
 14011 KB  🗺
14401 KB 🗺+🕸
---
🕸 adds an additional 390 KB
iPod touch (6th generation)  6216 KB  🗺
6594 KB 🗺+🕸
---
🕸 adds an additional 378 KB
 14096 KB  🗺
14494 KB 🗺+🕸
---
🕸 adds an additional 398 KB
louwers commented 1 year ago

According to this comment from @mwilsnd this is supported on iOS by now. Let me know if it's not.

roblabs commented 4 months ago

Closed from #1314