{"id":26811810,"url":"https://github.com/abdullahali2005/open-street-maps","last_synced_at":"2026-04-29T12:35:17.032Z","repository":{"id":284935432,"uuid":"956541682","full_name":"AbdullahAli2005/Open-Street-Maps","owner":"AbdullahAli2005","description":"Open Street Map integrated in a Flutter App","archived":false,"fork":false,"pushed_at":"2025-03-28T12:41:03.000Z","size":253,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T13:38:11.382Z","etag":null,"topics":["dart","flutter","flutter-map","open-route-service","open-street-map","routes"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AbdullahAli2005.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-28T12:33:18.000Z","updated_at":"2025-03-28T12:41:07.000Z","dependencies_parsed_at":"2025-03-28T13:38:21.771Z","dependency_job_id":"127162ff-b39f-49db-82ed-882dfa89c242","html_url":"https://github.com/AbdullahAli2005/Open-Street-Maps","commit_stats":null,"previous_names":["abdullahali2005/maps_integration"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdullahAli2005%2FOpen-Street-Maps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdullahAli2005%2FOpen-Street-Maps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdullahAli2005%2FOpen-Street-Maps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdullahAli2005%2FOpen-Street-Maps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbdullahAli2005","download_url":"https://codeload.github.com/AbdullahAli2005/Open-Street-Maps/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246266252,"owners_count":20749754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","flutter","flutter-map","open-route-service","open-street-map","routes"],"created_at":"2025-03-30T01:40:07.997Z","updated_at":"2026-04-29T12:35:16.992Z","avatar_url":"https://github.com/AbdullahAli2005.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Free Map (OSM) with Route Directions in Flutter\n\n## 🚀 Overview\nThis Flutter project integrates **OpenStreetMap (OSM)** using `flutter_map` and allows users to:\n- 📍 **Set Start \u0026 End Points** by tapping on the map.\n- 🚗 **Fetch and Display Routes** using OpenRouteService API.\n- 🗺 **Display Maps without Google Maps API** (Free \u0026 Open Source).\n- 🔎 **Secure API Key using .env** (Prevents key exposure).\n\n---\n\n## 📦 Dependencies\nAdd these dependencies to `pubspec.yaml`:\n```yaml\ndependencies:\n  flutter:\n    sdk: flutter\n  flutter_map: ^7.0.0\n  flutter_map_cancellable_tile_provider: ^1.0.2\n  latlong2: ^0.9.0\n  flutter_dotenv: ^5.1.0\n  http: ^0.13.5\n```\n\n---\n\n## 🔧 Installation \u0026 Setup\n### 1️⃣ Install Dependencies\nRun the following command:\n```sh\nflutter pub get\n```\n\n### 2️⃣ Set Up .env for API Key\nCreate a `.env` file in the **root directory** and add your OpenRouteService API key:\n```\nOPENROUTESERVICE_API_KEY=your_actual_api_key_here\n```\n\n### 3️⃣ Load .env in main.dart\nModify `main.dart`:\n```dart\nimport 'package:flutter_dotenv/flutter_dotenv.dart';\n\nFuture\u003cvoid\u003e main() async {\n  await dotenv.load(); // Load .env file\n  runApp(const MyApp());\n}\n```\n\n### 4️⃣ Use API Key in Your Code\nReplace hardcoded API keys with:\n```dart\nfinal String apiKey = dotenv.env['OPENROUTESERVICE_API_KEY'] ?? \"\";\n```\n\n---\n\n## 🗺 Features\n✅ **Interactive Map** - Tap to place markers.  \n✅ **Route Directions** - Shows route between two points.  \n✅ **Secure API Key** - Uses `.env` to hide API keys.  \n✅ **Clear Route** - Button to remove markers \u0026 routes.  \n✅ **Offline Tile Provider Support** - Improves performance.  \n\n---\n\n## 🏗 How to Use\n1️⃣ **Run the app**\n```sh\nflutter run\n```\n2️⃣ **Tap on the map** to set the **start point** (Green marker).  \n3️⃣ **Tap again** to set the **destination** (Red marker).  \n4️⃣ Route will be fetched \u0026 displayed automatically! 🚗  \n5️⃣ Press **\"Clear Route\"** to remove markers and routes.  \n\n---\n\n## 🛠 Troubleshooting\n### API Key Not Working? 🔑\n- Ensure you have a valid OpenRouteService API key.\n- Check if you **copied the key correctly** in `.env`.\n- Make sure you **restart** your app after changes.\n\n### Routes Not Fetching? 🛣️\n- Check your **console logs** for errors.\n- Ensure **valid coordinates** are selected.\n- Try different locations (some may not support routing).\n\n---\n\n## 🤝 Contributing\nFeel free to contribute! Fork the repo, create a new branch, and submit a pull request. 🚀\n\n---\n\n## 📝 License\nThis project is **MIT Licensed**. You can freely use and modify it.\n\n---\n\n### 💡 Author\nDeveloped by **Abdullah** ✨\n\n---\n\n🚀 **Enjoy building your own OpenStreetMap-based Flutter app!**\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahali2005%2Fopen-street-maps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdullahali2005%2Fopen-street-maps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahali2005%2Fopen-street-maps/lists"}