All Projects β†’ roblabs β†’ openmaptiles-ios-demo

roblabs / openmaptiles-ios-demo

Licence: MIT license
iOS demo app for showing offline maps for mobile.

Programming Languages

swift
15916 projects
shell
77523 projects

Projects that are alternatives of or similar to openmaptiles-ios-demo

vue-mapbox-map
A minimalist Vue component wrapping Mapbox GL or MapLibre GL for dynamic interaction!
Stars: ✭ 26 (+36.84%)
Mutual labels:  mapbox, maplibre
Vector-Tile-Spark-Process
🌏 Clip geographic data into MVT files based on Apache Spark
Stars: ✭ 16 (-15.79%)
Mutual labels:  mapbox
custom-mapbox-layer
A custom layer based on Mapbox
Stars: ✭ 66 (+247.37%)
Mutual labels:  mapbox
Delphi OSMMap
Visual control for Delphi and Lazarus to display OSM map
Stars: ✭ 27 (+42.11%)
Mutual labels:  mapbox
ProjectLockdown
Project Lockdown (an initiative from The IO Foundation) is a civic tech, interactive platform providing an overview of the state of Human and Digital Rights around the globe. It evaluates policies obtained from official sources that may impact their observance. It provides, among other tools, a layered map interface that allows for a visual repr…
Stars: ✭ 34 (+78.95%)
Mutual labels:  mapbox
organicmaps
πŸƒ Organic Maps is a free Android & iOS offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware. Your donations and positive reviews motivate and inspire our small team!
Stars: ✭ 3,689 (+19315.79%)
Mutual labels:  offline-maps
representable
We’re creating maps of communities to fight for fair representation. Add your community to the map today and make your voice heard.
Stars: ✭ 14 (-26.32%)
Mutual labels:  mapbox
react-native-mapbox-navigation
A navigation UI ready to drop into your React Native application
Stars: ✭ 86 (+352.63%)
Mutual labels:  mapbox
covid-19-sg
Visualising COVID-19/Coronavirus cases and cluster zones in Singapore
Stars: ✭ 15 (-21.05%)
Mutual labels:  mapbox
citylines
Citylines.co is a collaborative platform for mapping the transit systems of the world!
Stars: ✭ 53 (+178.95%)
Mutual labels:  mapbox
school-finder
πŸ‘€ Find schools by location
Stars: ✭ 16 (-15.79%)
Mutual labels:  mapbox
food-oasis-la
This is a website with a map of food sources in Los Angeles, and list of resources about food deserts and health, published with Jekyll and GitHub Pages.
Stars: ✭ 24 (+26.32%)
Mutual labels:  mapbox
react-mapboxgl
Declarative React components for mapbox-gl-js.
Stars: ✭ 15 (-21.05%)
Mutual labels:  mapbox
X-TRACK
A GPS bicycle speedometer that supports offline maps and track recording
Stars: ✭ 3,736 (+19563.16%)
Mutual labels:  offline-maps
web-maps-wcag-evaluation
Manual accessibility evaluation of popular web map tools.
Stars: ✭ 28 (+47.37%)
Mutual labels:  mapbox
basemaps
A lightweight package for accessing basemaps from open sources in R πŸ—ΊοΈ
Stars: ✭ 39 (+105.26%)
Mutual labels:  mapbox
gpxstudio.github.io
The online GPX file editor
Stars: ✭ 233 (+1126.32%)
Mutual labels:  mapbox
Munche
Munche is a πŸ” food delivery android application made in Java and Kotlin using the Firebase Suite and Mapbox Map Integration.
Stars: ✭ 35 (+84.21%)
Mutual labels:  mapbox
maplibre-gl-native-distribution
An open-source fork of Mapbox GL SDK for iOS distributed via the Swift Package Manager.
Stars: ✭ 29 (+52.63%)
Mutual labels:  maplibre
country-bounding-boxes
A list of ISO 3166-1 country codes and their bounding boxes.
Stars: ✭ 26 (+36.84%)
Mutual labels:  mapbox

Offline Map for Mobile

This repo describes how to build an Offline Map for mobile on iOS. Local assets such as vector data, styles, glyphs and sprites are built into a sample iOS app.

Features

Build

The MapLibre Mobile SDK is installed via the Swift Package Manager.

GitHub Actions


Command Line Building

# Build
xcodebuild -scheme GeographyClass build

# Test
xcodebuild -scheme GeographyClass test \
  -destination 'platform=iOS Simulator,name=iPhone 8'

# Test without building
xcodebuild -scheme GeographyClass test-without-building   \
  -destination 'platform=iOS Simulator,name=iPhone 11 Pro' \
  -destination 'platform=iOS,name=iPhone 8' \

Mapbox token

Create a new plain text file containing your access token, named either .mapbox or mapbox. To avoid accidentally committing this file to an open-source project, either you can save it to a location outside your project's version-controlled directory, or you can add this file to your project’s .gitignore file.

  • Then open the Project file
open openmaptiles-ios-demo.xcodeproj

Architecture

  • All assets are local and are accessed by Mapbox GL by the asset:// URI.
"sources": {
    "countries": {
        "type": "vector",
        "tiles": [
            "asset://geography-class.osm2vectortiles/{z}/{x}/{y}.pbf"
        ]
    }
},
"sprite": "asset://sprites/bright-v8",
"glyphs": "asset://glyphs/{fontstack}/{range}.pbf",

Soft Proofing Tiles

You can Soft Proof your tiles before they are installed into mobile by using Tileserver GL.

  • Discussion on whether .pbf can be compressed when using tippecanoe: mapbox / tippecanoe #582
    • tippecanoe -pC --maximum-zoom=7 -o poly.pC.mbtiles poly.geojson

Sample Tile JSON & Styles

Tile JSON with GitHub served .pbf. Choose either the Tile JSON or Mapbox Style

Locally served .pbf

# Install `serve` from https://www.npmjs.com/package/serve
#  yarn global add serve   # do this once

cd OSM2VectorTiles

# Serve raw `.pbf` files using [serve](https://www.npmjs.com/package/serve)
# serve -v # version

# Be sure to open `http://localhost:5000` to confirm what is being served
serve --cors --listen 5000 # serve current directory; CORS; listen on port 5000

# Using a different server to hook into those raw tiles
alias tsgl='docker run --rm -it -v "$(pwd)":/data -p 8081:80 maptiler/tileserver-gl --verbose'

tsgl  # starts Tileserver GL using the file config.json

Zurich Sample

Using the Zurich Sample from Maptiler.

See the metadata for details on

  • how to run Tileserver-GL using docker or npm.
  • How to fetch the Zurich MBTiles
Available Endpoints
tsgl --config tileserver-gl/config.zurich.json

Geography Class

Geography Class does not conform the OpenMapTiles schema v3. You can inspect

Available Endpoints
tsgl --config tileserver-gl/config.geography-class.json

geography-class

  • (QuickTime has a bug when screen recording; as it still shows WiFi service is on, when it indeed is off)

Building

You can build the Mapbox Maps v10 version by checking out the tag v10-geography-class

export REPO=roblabs/openmaptiles-ios-demo

git clone --recursive \
  https://github.com/$REPO.git \
  tmp/$REPO

cd tmp/$REPO

TAG=v10-geography-class
git checkout tags/$TAG -b $TAG
xed .

Change Log

  • Jun 17, 2021
  • May 06, 2021
    • Upgrade MapLibre for iOS to 5.12.0-pre.1. MetalANGLE build.
  • Mar 12, 2021
    • Upgrade MapLibre for iOS from 5.10.0 to 5.11.0
  • Jan 30, 2021
    • Convert to Offline Maps with SwiftUI. Local style with local tiles using the protocol asset://
    • branch: mapbox-maps-ios-v10 updated with MapboxMaps Library from https://github.com/mapbox/mapbox-maps-ios
    • Rename project to Geography Class
    • Minimum iOS is 13.0
    • Tested with Xcode 12.4 & 12.5
  • Jan 26, 2021
  • Jun 24, 2020
    • Updated notes on how to use Tileserver GL
  • Jun 17, 2020
  • Jun 2, 2020
    • Update to use Carthage only; removed dependency on Cocoapods
    • Upgrade to Xcode 11.5
    • Upgrade to Mapbox 5.9 & mapbox-events-ios 0.10
    • Add Xcode Bots & Continuous Integration scripts
  • Dec 13, 2019
    • Move from Cocoapods to Carthage
    • Upgrade to Xcode 11.3
    • Uprade to Mapbox 5.5
    • Add local, private Mapbox Token
  • Nov 19, 2019
    • Upgrade to Xcode 10.1
  • Jan 30, 2017
    • upgrade to Mapbox 3.4.1 & Podfile
  • 2016 β€” Initial Version
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].