# Location & Maps

> Get the device's location with the right accuracy, show maps with markers and routes, and use geofencing responsibly. Free notes, key concepts, resources and a...

Canonical: https://www.internhack.in/roadmaps/tracks/mobile/location-maps
Last updated: 2026-11-28

Get the device's location with the right accuracy, show maps with markers and routes, and use geofencing responsibly.

Intermediate · about 6 hours · difficulty 3/5

Learn first: [Runtime Permissions & Privacy](https://www.internhack.in/roadmaps/tracks/mobile/permissions)

Location powers delivery, ride sharing, fitness, weather and local search apps, but it is also one of the most battery-hungry and privacy-sensitive features.

### Getting location

- One-off position for "near me" features vs continuous updates for tracking.
- Choose **accuracy** deliberately: approximate is enough for weather; navigation needs precise.
- Foreground location is much easier to get approved than **background location**, which requires strong justification in both stores.
- Libraries: expo-location, geolocator (Flutter), the Fused Location Provider (Android), Core Location (iOS).

### Maps

- react-native-maps or Expo Maps, google_maps_flutter, Maps Compose, and MapKit for SwiftUI.
- Markers, clustering for many points, polylines for routes, and camera movement.
- Map SDKs usually need API keys restricted to your app's package name or bundle ID.

### Geofencing and geocoding

Geofences trigger when a user enters or leaves an area, with OS limits on how many you can register. Geocoding converts addresses to coordinates and back.

### Pitfalls

- GPS takes time and can be wrong indoors; show a last-known position and accuracy radius.
- Continuous high-accuracy updates drain batteries quickly; stop updates when not needed.

**Good enough to move on:** your app shows the user on a map with nearby points of interest, and stops tracking when the screen is left.

## Key concepts

- **Foreground location**
- **Accuracy and battery trade-offs**
- **Background location**: Hard to get approved
- **Map views and markers**
- **Marker clustering**
- **Geocoding**
- **Geofencing**

## Mini project

Build a nearby-cafes app that centres the map on the user, shows clustered markers from a public dataset, and opens directions in the system maps app.

## Check yourself

What accuracy setting and update strategy would you choose for a weather app versus a running tracker?

## Free resources

- [Expo Location](https://docs.expo.dev/versions/latest/sdk/location/) (Expo)
- [Android: Location](https://developer.android.com/develop/sensors-and-location/location) (Android Developers)
- [Core Location](https://developer.apple.com/documentation/corelocation) (Apple)

Previous: [Camera, Photos & Media](https://www.internhack.in/roadmaps/tracks/mobile/camera-media) · Next: [Sensors, Haptics & Biometrics](https://www.internhack.in/roadmaps/tracks/mobile/sensors-biometrics)

## More in Device Capabilities & Background Work

- [Runtime Permissions & Privacy](https://www.internhack.in/roadmaps/tracks/mobile/permissions)
- [Camera, Photos & Media](https://www.internhack.in/roadmaps/tracks/mobile/camera-media)
- [Location & Maps](https://www.internhack.in/roadmaps/tracks/mobile/location-maps)
- [Sensors, Haptics & Biometrics](https://www.internhack.in/roadmaps/tracks/mobile/sensors-biometrics)
- [Background Tasks & App States](https://www.internhack.in/roadmaps/tracks/mobile/background-work)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Mobile App Developer Roadmap](https://www.internhack.in/roadmaps/tracks/mobile)
