{"id":13707976,"url":"https://github.com/airbnb/AirMapView","last_synced_at":"2025-05-06T07:31:16.067Z","repository":{"id":27497683,"uuid":"30977962","full_name":"airbnb/AirMapView","owner":"airbnb","description":"A view abstraction to provide a map user interface with various underlying map providers","archived":false,"fork":false,"pushed_at":"2022-01-10T21:33:33.000Z","size":8649,"stargazers_count":1870,"open_issues_count":26,"forks_count":215,"subscribers_count":164,"default_branch":"master","last_synced_at":"2024-11-13T17:45:23.250Z","etag":null,"topics":["airmapview","android","google-maps","java","map","mapbox"],"latest_commit_sha":null,"homepage":"http://airbnb.github.io/AirMapView/","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/airbnb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-18T17:50:15.000Z","updated_at":"2024-10-18T17:27:03.000Z","dependencies_parsed_at":"2022-07-12T16:09:08.653Z","dependency_job_id":null,"html_url":"https://github.com/airbnb/AirMapView","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbnb%2FAirMapView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbnb%2FAirMapView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbnb%2FAirMapView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/airbnb%2FAirMapView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/airbnb","download_url":"https://codeload.github.com/airbnb/AirMapView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252639966,"owners_count":21780848,"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":["airmapview","android","google-maps","java","map","mapbox"],"created_at":"2024-08-02T22:01:51.519Z","updated_at":"2025-05-06T07:31:15.530Z","avatar_url":"https://github.com/airbnb.png","language":"Java","readme":"# AirMapView\n\n[![Build Status](https://travis-ci.org/airbnb/AirMapView.svg)](https://travis-ci.org/airbnb/AirMapView)\n\nAirMapView is a view abstraction that enables interactive maps\nfor devices with and without Google Play Services. It is built\nto support multiple native map providers including Google Maps V2 and soon Amazon Maps V2.\nIf a device does not have any supported native map provider, AirMapView\nwill fallback to a web based map provider (currently Google Maps). Easy to integrate, it is a drop-in replacement for the Google Maps V2 package. AirMapView's original author is [Nick Adams](https://github.com/nwadams).\n\n* [Features](#features)\n* [Download](#download)\n* [How to Use](#how-to-use)\n* [Sample App](#sample-app)\n\n## Features\n\n* Google Maps V2\n* Swap map providers at runtime\n* Web based maps for devices without Google Play Services\n\n![](screenshots/google_maps_v2.png)\n![](screenshots/google_web_maps.png)\n\n\n\n## Download\n\nGrab via Gradle:\n\n```groovy\ncompile 'com.airbnb.android:airmapview:1.8.0'\n```\n\nSnapshots of the development version are available in [Sonatype's `snapshots` repository](https://oss.sonatype.org/content/repositories/snapshots/).\n\n## Sample App\nThe project includes a sample app which uses AirMapView. The sample app allows toggling between map providers, exemplifies adding map markers, and displays various callback information. The sample project can be built manually or you can [download the APK](https://www.dropbox.com/s/8gcxn2ouc44t53x/AirMapView-Sample.apk?dl=0).\n\n## How to Use\n\n1. Define `AirMapView` in your layout file\n    ```xml\n    \u003ccom.airbnb.android.airmapview.AirMapView\n        android:id=\"@+id/map_view\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"/\u003e\n    ```\n\n1. Initialize in code\n    ```java\n    mapView = (AirMapView) findViewById(R.id.map_view);\n    mapView.initialize(getSupportFragmentManager());\n    ```\n\n1. Add markers/polylines/polygons\n    ```java\n    map.addMarker(new AirMapMarker(latLng, markerId)\n            .setTitle(\"Airbnb HQ\")\n            .setIconId(R.drawable.icon_location_pin));\n    ```\n\n## Mapbox Web setup\nTo use Mapbox Web maps in AirMapView, you'll need to [sign up for a free account with Mapbox](https://www.mapbox.com/signup/).  From there you'll use an [Access Token](https://www.mapbox.com/help/define-access-token/) and [Map ID](https://www.mapbox.com/help/define-map-id/) in your AirMapView app.  They're are then included in your app's `AndroidManifest.xml` file as `meta-data` fields.\n\n```xml\n\u003cmeta-data\n    android:name=\"com.mapbox.ACCESS_TOKEN\"\n    android:value=ACCESS_TOKEN/\u003e\n\u003cmeta-data\n    android:name=\"com.mapbox.MAP_ID\"\n    android:value=MAP_ID/\u003e\n```\n\n## Native Google Maps setup\n\nWith AirMapView, to support native Google maps using the [Google Maps v2](https://developers.google.com/maps/documentation/android/) SDK you will still need to set up the Google Maps SDK as described [here](https://developers.google.com/maps/documentation/android/start#getting_the_google_maps_android_api_v2). Follow all the instructions except the one about adding a map since AirMapView takes care of that for you. See the sample app for more information about how to set up the maps SDK.\n\nLicense\n--------\n\n    Copyright 2015 Airbnb, Inc.\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\n [1]: http://airbnb.github.io/airbnb/AirMapView/\n","funding_links":[],"categories":["Java","Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fairbnb%2FAirMapView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fairbnb%2FAirMapView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fairbnb%2FAirMapView/lists"}