{"id":16556272,"url":"https://github.com/asynctaskcoffee/androidofflinemaplibrary","last_synced_at":"2025-06-24T21:31:54.339Z","repository":{"id":170454099,"uuid":"205383576","full_name":"AsynctaskCoffee/AndroidOfflineMapLibrary","owner":"AsynctaskCoffee","description":"Offline OpenStreet Map Library (No Internet Required) You dont have to even one-time connect!","archived":false,"fork":false,"pushed_at":"2022-10-03T16:11:56.000Z","size":57307,"stargazers_count":24,"open_issues_count":1,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T23:07:06.471Z","etag":null,"topics":["map","offline","offlinemap","openstreetmap","osm","osmdroid"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AsynctaskCoffee.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":"2019-08-30T13:03:16.000Z","updated_at":"2025-02-23T19:38:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b177e9a-8c11-422b-81c1-48878110b6f9","html_url":"https://github.com/AsynctaskCoffee/AndroidOfflineMapLibrary","commit_stats":null,"previous_names":["asynctaskcoffee/androidofflinemaplibrary"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/AsynctaskCoffee/AndroidOfflineMapLibrary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsynctaskCoffee%2FAndroidOfflineMapLibrary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsynctaskCoffee%2FAndroidOfflineMapLibrary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsynctaskCoffee%2FAndroidOfflineMapLibrary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsynctaskCoffee%2FAndroidOfflineMapLibrary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AsynctaskCoffee","download_url":"https://codeload.github.com/AsynctaskCoffee/AndroidOfflineMapLibrary/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsynctaskCoffee%2FAndroidOfflineMapLibrary/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261759196,"owners_count":23205512,"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":["map","offline","offlinemap","openstreetmap","osm","osmdroid"],"created_at":"2024-10-11T20:04:01.733Z","updated_at":"2025-06-24T21:31:54.326Z","avatar_url":"https://github.com/AsynctaskCoffee.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# No longer maintained!\n\n\n# AndroidOfflineMapLibrary\nOffline OpenStreet Map Library (No Internet Required) You dont have to even one-time connect!\n\n\u003e Offline OpenStreetMap Library\n\n\u003e Performance friendly and scalable\n\n#### [DETAILED MEDIUM POST](https://medium.com/@asynctaskcoffee/android-openstreetmap-offline-map-setup-8c71eee40088) \n\n## Why this project exists\n\nOffline map usage is kind a problem for developers and there are rare documentations. I believe this library will helpful for developers. \n\n## Features and Usage\n\n### Implementation\n \nYou need to download offline map-tiles as SQLite format. And you should put it under assets folder. Let me explain how to download offline map-tiles step-by-step;\n\n##### 1. First you need to download Mobile Atlas Creator from [HERE](https://sourceforge.net/projects/mobac/files/Mobile%20Atlas%20Creator/MOBAC%202.0/Mobile%20Atlas%20Creator%202.1.2.zip/download) \n\n##### 2. Open MOBAC and select Osmdroid SQLite\n\u003cimg src=\"picsfortut/q1.png\" width=\"650\"\u003e \n\n##### 3. Select map source (selecting osm is better) and zoom-levels (15-14-13-12 are ideal) as you desire from left panel. \n\u003cimg src=\"picsfortut/q2.png\" width=\"650\"\u003e \n\n##### 4. Draw a area (small areas consume less storage). And press add selection button from left panel.\n\u003cimg src=\"picsfortut/q3.png\" width=\"650\"\u003e \n\n##### 5. As you can see layers are selected. After selecting layers press Create Atlas button. \n\u003cimg src=\"picsfortut/q4.png\" width=\"350\"\u003e \n\n##### 6. Select 'Ignore download errors and continue automatically' and continue.\n\u003cimg src=\"picsfortut/q5.png\" width=\"650\"\u003e\n\n##### 7. After finishing download process rename the SQLite file as 'map.sqlite' and copy it into assets folder.\n\u003cimg src=\"picsfortut/q6.png\" width=\"450\"\u003e \n\n##### 8. And yes! You completed the hard part. Rest of the steps just coding few lines.\n\n#### Java \n\n```java\npublic class MainActivity extends AppCompatActivity implements MapListener, GeoPointListener {\n\n    OfflineMapView offlineMapView;\n    MapUtils mapUtils;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n        setContentView(R.layout.activity_main);\n        offlineMapView = findViewById(R.id.map);\n        offlineMapView.init(this, this);\n    }\n\n\n    @Override\n    public void mapLoadSuccess(MapView mapView, MapUtils mapUtils) {\n\n        // GeoPoint belongs to ISTANBUL heart of the world :)\n        this.mapUtils = mapUtils;\n        offlineMapView.setInitialPositionAndZoom(new GeoPoint(41.025135, 28.974101), 14.5);\n\n        // 41.025135, 28.974101 Galata Tower\n\n        Marker marker = new Marker(mapView);\n        marker.setPosition(new GeoPoint(41.025135, 28.974101));\n        marker.setIcon(getResources().getDrawable(R.drawable.galata_tower));\n\n        // marker.setImage(drawable);\n\n        marker.setTitle(\"Hello Istanbul\");\n        marker.showInfoWindow();\n        mapView.getOverlays().add(marker);\n        mapView.invalidate();\n    }\n\n    @Override\n    public void mapLoadFailed(String ex) {\n        Log.e(\"ex:\", ex);\n    }\n\n    @Override\n    public void onGeoPointRecieved(GeoPoint geoPoint) {\n\n        //Selected GeoPoint Returns Here\n\n        Toast.makeText(this, geoPoint.toDoubleString(), Toast.LENGTH_SHORT).show();\n    }\n\n    public void activateAnimatePicker(View view) {\n        if (mapUtils != null)\n            offlineMapView.setAnimatedLocationPicker(true, this, mapUtils);\n    }\n}\n```\n\n#### Kotlin\n```kotlin\nclass MainActivityKotlin : AppCompatActivity(), MapListener, GeoPointListener {\n\n    lateinit var offlineMapView: OfflineMapView\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main_kotlin)\n        offlineMapView = findViewById(R.id.map)\n        offlineMapView.init(this, this)\n    }\n\n    @SuppressLint(\"ShowToast\")\n    override fun onGeoPointRecieved(geoPoint: GeoPoint?) {\n\n        //Selected GeoPoint Returns Here\n\n        Toast.makeText(this, geoPoint?.toDoubleString(), Toast.LENGTH_SHORT).show()\n    }\n\n    override fun mapLoadSuccess(mapView: MapView?, mapUtils: MapUtils?) {\n\n        // GeoPoint belongs to ISTANBUL heart of the world :)\n\n        offlineMapView.setInitialPositionAndZoom(GeoPoint(41.011099, 28.996885), 15.5)\n        offlineMapView.setAnimatedLocationPicker(true, this, mapUtils)\n\n        \n    }\n\n    override fun mapLoadFailed(ex: String?) {\n        Log.e(\"ex\", ex.orEmpty())\n    }\n}\n```\n\n\n#### Or XML\n```xml    \n\u003cegolabsapps.basicodemine.offlinemap.Views.OfflineMapView\n        android:id=\"@+id/map\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        app:initialFocusLatitude=\"41.025818\"\n        app:initialFocusLongitude=\"28.973436\"\n        app:zoomLevel=\"15\" /\u003e\n```\n\n###### Result: Say Hi to ISTANBUL :)\n\n\u003cimg src=\"picsfortut/q7.png\" width=\"350\"\u003e \u003cimg src=\"picsfortut/q8.gif\" width=\"350\"\u003e  \n\n\n## Implementation\n\n###### Add it in your root build.gradle at the end of repositories\n\n```groovy\n    repositories {\n        maven { url 'https://jitpack.io' }\n    }\n```\n\n###### Add the dependency\n\n```groovy\n    implementation 'com.github.AsynctaskCoffee:AndroidOfflineMapLibrary:v1'\n    implementation 'com.github.MKergall:osmbonuspack:6.6.0'\n    implementation 'org.osmdroid:osmdroid-android:6.1.0'\n```\n\n\n## Update 20.01.2021\n\nPlease add android:requestLegacyExternalStorage=\"true\" in your manifest file.\n\n## Update 25.08.2021\n\nPlease check https://developer.android.com/about/versions/11/privacy/storage\n\n## License\n\n```\n   Copyright 2019 Egemen ÖZOGUL\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasynctaskcoffee%2Fandroidofflinemaplibrary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasynctaskcoffee%2Fandroidofflinemaplibrary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasynctaskcoffee%2Fandroidofflinemaplibrary/lists"}