just a map - Just a map, except it updates in real-time
A simple and practical map application designed for motorcycle handlebar mounting.
- ✅ Map display centered on current location
- ✅ Automatic location tracking (when moved 10m or more)
- ✅ Tracking mode disabled when map is manually moved
- ✅ Return to current location button (60x60pt for glove compatibility)
- ✅ Proper location permission handling
- ✅ Error display and navigation to settings
- ✅ Current location address display (reverse geocoding)
- ✅ Support for Japanese address format (Prefecture → City → Street)
- ✅ Priority display of place names (e.g., Tokyo Station)
- ✅ Postal code display
- ✅ Sleep prevention feature (screen doesn't automatically turn off)
- ✅ Proper background/foreground transition handling
- ✅ Zoom controls (12 discrete zoom levels)
- From building level (200m) to global level (1,000,000m)
- Stable altitude-based implementation (unaffected by MapKit internal conversions)
- Button grays out at zoom limits
- ✅ Map display mode switching (Standard/Hybrid/Satellite)
- ✅ North Up / Heading Up toggle button (rotation implemented)
- ✅ Settings persistence (UserDefaults)
- Zoom level (saved as index)
- Map style
- Map orientation setting
- ✅ North Up / Heading Up switching and rotation
- ✅ Compass
- iOS: 17.0 or later
- Frameworks: SwiftUI, MapKit, CoreLocation
- Location Accuracy: Best (kCLLocationAccuracyBest)
- Update Frequency: Varies according to zoom
- Address Retrieval: CLGeocoder (reverse geocoding)
- Sleep Prevention: UIApplication.shared.isIdleTimerDisabled
- Zoom Implementation: MKMapCamera.distance (altitude) based
- Xcode 16.0 or later (optional)
- Swift 5.9 or later
- macOS 14.0 or later / Linux / WSL
- iOS Simulator (iOS 18.5 recommended)
- xtool (cross-platform build tool)
git clone <repository-url>
cd just-a-map
# Install xtool
brew install xtool # macOS
# For Linux/WSL see https://github.com/xtool-org/xtool
# Build and run using Makefile
make build # Build the app
make run # Run in simulator
make install DEVICE_ID=<device-id> # Install on physical device
# Check device IDs
make devices # Display list of connected devices
# Other useful commands
make test # Run tests
make clean # Clean build artifacts
make help # Display available commands
Note: xtool cannot compile Assets.xcassets, so special steps are required for asset processing. The Makefile handles this automatically.
When changing icons or other assets:
- Run
make compile-assets
on macOS to compile assets - Since compiled assets are committed to Git, builds are possible on other platforms
# Open as SwiftPM project
open Package.swift
See xtool Migration Guide for details.
When the app launches, a location permission dialog will appear. Select "Allow While Using App"
- From the emulator menu bar: Features > Location
- Select from the following options:
- Apple: Apple headquarters (California)
- City Bicycle Ride: Simulate bicycle movement
- City Run: Simulate running movement
- Freeway Drive: Simulate highway driving
- Custom Location...: Enter custom latitude/longitude
- First select "Apple" to verify basic operation
- Test movements similar to motorcycle riding with "City Bicycle Ride"
- Set Japanese locations with Custom Location:
- Tokyo Station: Latitude 35.6762, Longitude 139.6503
- Osaka Station: Latitude 34.7024, Longitude 135.4959
- Location permission dialog appears on app launch
- After permission, current location is displayed at map center
- Map follows when location moves
- Tracking is disabled when map is manually dragged
- Tapping the location button in bottom-right returns to current location
- Error banner displays when location permission is denied
- Settings button in error banner opens Settings app
- Current location address displays at the top
- Address updates when moving
- Screen doesn't sleep while app is in use
- Sleep prevention is disabled when moving to background
- Zoom in/out buttons switch between 12 zoom levels
- Buttons gray out at zoom limits
- Buttons reliably move to next level after pinch operation
- Map style button switches between Standard/Hybrid/Satellite
- North Up/Heading Up button displays (state toggles on tap)
- Previous settings restore on app restart
- Reset emulator: Device > Erase All Content and Settings...
- Clean build in Xcode: Product > Clean Build Folder
- Check emulator location settings: Settings > Privacy & Security > Location Services
You can check logs in the debug area at the bottom of Xcode. Current level is output to console during zoom operations.
make test
open Package.swift
# ⌘+U in Xcode
xcodebuild test -scheme JustAMap -destination 'platform=iOS Simulator,name=iPhone 16'
- LocationManager protocol compliance
- Location permission handling
- Location update delegate notifications
- Error handling
- Address format conversion (AddressFormatterTests)
- Sleep prevention feature (IdleTimerManagerTests)
- Altitude-based zoom feature and map style switching (MapControlsViewModelTests)
- 12-level zoom management
- Zoom limit testing
- Altitude to zoom index conversion
- Settings persistence (MapSettingsStorageTests)
- Zoom index save/load
- Check simulator location settings: Features > Location
- Verify Settings > Privacy & Security > Location Services is ON
- Delete and reinstall the app
This is a temporary error specific to the simulator and doesn't affect app operation. It doesn't occur on physical devices.
This project is released under the MIT License. See the LICENSE file for details.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
For more detailed technical documentation, see the doc directory.