A multi-stop route optimization app built with Flutter and OpenStreetMap.
Map Now is a utility-first navigation tool that specializes in multi-stop route optimization. The app can take up to 3 intermediate waypoints and re-order them to ensure the most efficient travel path based on distance and time.
- ✅ User authentication (Name & Mobile)
- ✅ Global address search using Geocoding API
- ✅ Multi-stop route optimization (up to 3 stops)
- ✅ Interactive OpenStreetMap integration (100% FREE)
- ✅ Optimized polyline path visualization
- ✅ Distance calculation and display
- ✅ No API keys required for maps
lib/
├── constants/
│ └── api_constants.dart # API endpoints configuration
├── models/
│ ├── user_model.dart # User data model
│ ├── place_model.dart # Location/place data model
│ └── route_model.dart # Route optimization data model
├── providers/
│ ├── auth_provider.dart # Authentication state management
│ └── map_provider.dart # Map and routing state management
├── screens/
│ ├── login_screen.dart # User login screen
│ └── map_home_screen.dart # Main map interface
├── services/
│ ├── auth_service.dart # Login API integration
│ ├── geocoding_service.dart # Address search API
│ └── routing_service.dart # Route optimization API
└── main.dart # App entry point
flutter_map- OpenStreetMap integration (FREE)latlong2- Latitude/longitude utilitieshttp- API callsprovider- State managementshared_preferences- Local data storagelocation- Location servicesgeocoding- Geocoding utilities
cd map_now
flutter pub getThat's it! No API keys or additional configuration needed for maps.
flutter runThe app uses OpenStreetMap which is completely free and requires no API keys.
ACCESS_FINE_LOCATIONACCESS_COARSE_LOCATIONINTERNET
Add to ios/Runner/Info.plist:
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to location for navigation.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>This app needs access to location for navigation.</string>The app uses three main API endpoints:
-
Login API
- URL:
https://routing.amphereai.com/api/login - Method: POST
- Body:
{ "name": "string", "mobile": "string" }
- URL:
-
Geocoding API
- URL:
https://maps.amphereai.com/api/v1/addresses/search - Method: POST
- Body:
{ "addressString": "string" }
- URL:
-
Multi-Stop Routing API
- URL:
https://routing.amphereai.com/api/c-square/multistop - Method: POST
- Body:
{ "coordinates": [...], "cache": true }
- URL:
# Check for connected devices
flutter devices
# Run on connected device
flutter run
# Run in debug mode
flutter run --debug
# Run in release mode
flutter run --releaseflutter build apk --releaseflutter build ios --release- Maximum Stops: 3 intermediate stops allowed
- Total Coordinates: Start + 3 Stops + Destination = 5 points maximum
- Distance Unit: API returns meters, displayed as kilometers
- Caching: Route optimization uses caching for performance
The app uses Provider for state management with two main providers:
- AuthProvider: Manages user authentication and session
- MapProvider: Handles map interactions, search, and route optimization
- Test the login functionality
- Test address search
- Test route optimization with multiple stops
- Customize UI theme and styling as needed
- (Optional) Switch to alternative tile providers if needed
- Check internet connectivity
- Verify OpenStreetMap tile servers are accessible
- Try alternative tile providers
flutter clean
flutter pub get
flutter run- Make sure location permissions are granted in device settings
- Check that permissions are properly configured in manifest files
- Real-time traffic data integration
- Save favorite routes
- Route history
- Turn-by-turn navigation
- Voice guidance
- Multiple route alternatives
Version: 1.0
Platform: Flutter (iOS/Android)
Status: Development Ready