Documentation Index
Fetch the complete documentation index at: https://docs.nativeline.ai/llms.txt
Use this file to discover all available pages before exploring further.
Maps & Location
Add interactive maps, directions, place search, and location tracking using Apple’s built-in frameworks.What You Can Build
- Map Display — Show maps with markers
- User Location — Track where users are
- Directions — Route calculation and navigation
- Place Search — Find locations by name
- Geocoding — Convert addresses to coordinates
Built-In vs External
Apple MapKit (Built-In)
Pros:- No API key needed
- Free (included in iOS)
- Privacy-focused
- Native performance
- iOS only
- Limited customization
- No Street View
Google Maps (External)
Pros:- More detailed in some areas
- Street View
- Cross-platform
- Requires API key
- Has usage costs
- More setup
Displaying a Map
Basic Map
Map with Markers
Customizing the Map
User Location
Requesting Permission
- When In Use — Only while app is open
- Always — Even in background (rarely needed)
Getting Current Location
Tracking Location
Place Search
Search by Name
Search Nearby
Directions
Getting Directions
Multiple Routes
Turn-by-Turn Instructions
Geocoding
Address to Coordinates
Coordinates to Address
Map Annotations
Custom Markers
Marker Details
Clustering
Common Use Cases
Store Locator
Delivery Tracking
Location Check-In
Location Settings
Accuracy Levels
| Level | Use Case | Battery |
|---|---|---|
| Best | Precise tracking | High |
| Kilometer | City-level | Medium |
| Three Kilometers | Region | Low |
Background Location
Privacy Considerations
Permission Best Practices
- Only request location when needed
- Use “When In Use” unless you need background
- Explain why you need location
- Work gracefully without location
Handling Denied Permission
Troubleshooting
Map not showing
Map not showing
- Check internet connection
- Verify map region is set
- Check if map view is sized correctly
Location not working
Location not working
- Is permission granted?
- Simulator: Set location in Features menu
- Real device: Check Privacy settings
Search returning no results
Search returning no results
- Check the query isn’t empty
- Try broader search terms
- Verify network connection
Directions failing
Directions failing
- Start and end points valid?
- Route possible by selected mode?
- Network connection available?
Testing Location
In Simulator
Set simulated locations:- Features → Location → Custom Location
- Or choose preset (City Run, Freeway Drive)
On Device
Real device uses actual GPS. Walk around to test tracking.Next Steps
Weather APIs
Add weather to location features
Supabase
Store location data in the cloud