Skip to content

Commit

Permalink
Updated README file for 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SupasinTatiyanupanwong committed Apr 17, 2021
1 parent ce5b39d commit e9f2c85
Showing 1 changed file with 38 additions and 36 deletions.
74 changes: 38 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,52 @@
# Map Kit

[![Download](https://api.bintray.com/packages/supasintatiyanupanwong/android.libraries.kits.maps/maps-core/images/download.svg)](https://bintray.com/supasintatiyanupanwong/android.libraries.kits.maps/maps-core/_latestVersion)
[![javadoc](https://javadoc.io/badge2/me.tatiyanupanwong.supasin.android.libraries.kits.maps/maps-core/javadoc.svg)](https://javadoc.io/doc/me.tatiyanupanwong.supasin.android.libraries.kits.maps/maps-core)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.supasintatiyanupanwong.libraries.android.kits.maps/maps-core/badge.svg)](https://search.maven.org/search?q=g:dev.supasintatiyanupanwong.libraries.android.kits.maps)
[![javadoc](https://javadoc.io/badge2/dev.supasintatiyanupanwong.libraries.android.kits.maps/maps-core/javadoc.svg)](https://javadoc.io/doc/dev.supasintatiyanupanwong.libraries.android.kits.maps/maps-core)
[![license](https://img.shields.io/github/license/SupasinTatiyanupanwong/map-kit-android.svg)](https://www.apache.org/licenses/LICENSE-2.0)

Abstraction wrapper that encapsulates Maps APIs of supported platforms for Android, allowing access to multiple Maps APIs while maintaining your application single codebase.
Map Kit is an abstraction wrapper that encapsulates Android's Maps APIs of Google Maps SDK for Android and HUAWEI Map Kit.

Map Kit is currently providing support for Google Maps and Huawei Maps.
## Architecture

## Usage
The library consists of 3 artifacts; `maps-core`, `maps-google`, and `maps-huawei`.

This project contains 3 artifacts; `maps-core`, `maps-google`, and `maps-huawei`.
`maps-core` artifact provides an abstraction interface to interact with Maps APIs.

`maps-core` artifact provides abstraction interface to interact with Maps APIs.
`maps-google` artifact provides the Google Maps SDK for Android integration to Map Kit.

`maps-google` artifact provides Google Maps integration.
`maps-huawei` artifact provides the HUAWEI Map Kit integration to Map Kit.

`maps-huawei` artifact provides Huawei Maps integration.
## Usage

### Migration from existing Maps APIs
### Migrating from the existing APIs

| Google Name | Huawei Name | Map Kit Name |
| Google Maps SDK for Android | HUAWEI Map Kit | Map Kit |
|:--------------------------------- |:------------------------- |:------------------------------------------------------------ |
| ``com.google.android.gms.maps.*`` | ``com.huawei.hms.maps.*`` | ``me.tatiyanupanwong.supasin.android.libraries.kits.maps.*`` |
| ``com.google.android.gms.maps.*`` | ``com.huawei.hms.maps.*`` | ``dev.supasintatiyanupanwong.libraries.android.kits.maps.*`` |
| ``GoogleMap`` | ``HuaweiMap`` | ``MapClient`` |
| ``new LatLng()`` | ``new LatLng()`` | ``MapKit.newLatLng()`` |
| ``new *Options()`` | ``new *Options()`` | ``MapKit.new*Options()`` |
| ``*.builder()`` | ``*.builder()`` | ``MapKit.new*Builder()`` |
| ``*Factory.*()`` | ``*Factory.*()`` | ``MapKit.get*Factory().*()`` |
| ``Tile.NO_TILE`` | ``Tile.NO_TILE`` | ``MapKit.noTile()`` |

### Limitations

1. Models are currently not `Parcelable`.
2. `*MapOptions` is currently not supported.
3. Google's `StreetView` is currently not supported.

### Additional documentation
### Limitation

* [Maps SDK for Android - Google Developer](https://developers.google.com/maps/documentation/android-sdk/intro)
* [Map Kit - HMS Core - HUAWEI Developer](https://developer.huawei.com/consumer/en/hms/huawei-MapKit)
* Models are not `Parcelable`.
* `MapOptions` is currently not supported.
* `StreetView` is currently not supported.

## Download
## Declaring dependencies

Add the following to your Gradle build file:
Add the dependencies for the artifacts you need in the `build.gradle` file for your app or module:

```groovy
dependencies {
implementation 'me.tatiyanupanwong.supasin.android.libraries.kits.maps:maps-google:1.2.2'
implementation 'me.tatiyanupanwong.supasin.android.libraries.kits.maps:maps-huawei:1.2.2'
// To use the Google Maps SDK for Android via Map Kit
implementation 'dev.supasintatiyanupanwong.libraries.android.kits.maps:maps-google:2.0.0'
// To use the HUAWEI Map Kit via Map Kit
implementation 'dev.supasintatiyanupanwong.libraries.android.kits.maps:maps-huawei:2.0.0'
}
```

Expand All @@ -58,7 +56,7 @@ However, it is recommended to separate builds between them as next:

```groovy
android {
...
// ...
flavorDimensions 'vendor'
productFlavors {
google
Expand All @@ -78,20 +76,24 @@ configurations {
}
dependencies {
google 'me.tatiyanupanwong.supasin.android.libraries.kits.maps:maps-google:1.2.2'
huawei 'me.tatiyanupanwong.supasin.android.libraries.kits.maps:maps-huawei:1.2.2'
google 'dev.supasintatiyanupanwong.libraries.android.kits.maps:maps-google:2.0.0'
huawei 'dev.supasintatiyanupanwong.libraries.android.kits.maps:maps-huawei:2.0.0'
}
```

`maps-core` may be used to provides Maps APIs interaction if needed, e.g. to pass `LatLng` object to different module.
But, make sure to have one of the integration artifacts included in your final build, otherwise an exception will be thrown at runtime.

```groovy
dependencies {
implementation 'me.tatiyanupanwong.supasin.android.libraries.kits.maps:maps-core:1.2.1'
}
```
For more information about dependencies, see [Add build dependencies](https://developer.android.com/studio/build/dependencies).

## Additional documentation

* [Maps SDK for Android - Google Developer](https://developers.google.com/maps/documentation/android-sdk/intro)
* [Map Kit - HMS Core - HUAWEI Developer](https://developer.huawei.com/consumer/en/hms/huawei-MapKit)

## Feedback

However, make sure to have one of integration artifacts included in your final build, otherwise an exception will be thrown.
Your feedback helps make Map Kit better. Let us know if you discover new issues or have ideas for improving this library.
Please take a look at the [existing issues](https://github.com/SupasinTatiyanupanwong/map-kit-android/issues) in this library before you create a new one.

## License

Expand All @@ -102,7 +104,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand Down

0 comments on commit e9f2c85

Please sign in to comment.