|
11 | 11 | This open-source library contains utilities that are useful for a wide
|
12 | 12 | range of applications using the [Google Maps SDK for Android][android-site].
|
13 | 13 |
|
14 |
| -- **Marker clustering** — handles the display of a large number of points |
15 | 14 | - **Marker animation** - animates a marker from one position to another
|
16 |
| -- **Heat maps** — display a large number of points as a heat map |
17 |
| -- **IconGenerator** — display text on your Markers |
18 |
| -- **Poly decoding and encoding** — compact encoding for paths, |
| 15 | +- **Marker clustering** — handles the display of a large number of points |
| 16 | +- **Marker icons** — display text on your Markers |
| 17 | +- **Heatmaps** — display a large number of points as a heat map |
| 18 | +- **Import KML** — displays KML data on the map |
| 19 | +- **Import GeoJSON** — displays and styles GeoJSON data on the map |
| 20 | +- **Polyline encoding and decoding** — compact encoding for paths, |
19 | 21 | interoperability with Maps API web services
|
20 | 22 | - **Spherical geometry** — for example: computeDistance, computeHeading,
|
21 | 23 | computeArea
|
22 |
| -- **KML** — displays KML data |
23 |
| -- **GeoJSON** — displays and styles GeoJSON data |
24 |
| -- **StreetView Utility** — checks if a given StreetView location exists |
| 24 | +- **Street View metadata** — checks if a Street View panorama exists at a given location |
25 | 25 |
|
26 |
| -<p align="center"><img width="90%" vspace="20" src="https://cloud.githubusercontent.com/assets/1950036/6629704/f57bc6d8-c908-11e4-815a-0d909fe02f99.gif"></p> |
| 26 | +You can also find Kotlin extensions for this library in [Maps Android KTX][android-maps-ktx]. |
27 | 27 |
|
28 |
| -You can also find Kotlin extensions for this library [here][android-maps-ktx]. |
| 28 | +<p align="center"><img width="90%" vspace="20" src="https://cloud.githubusercontent.com/assets/1950036/6629704/f57bc6d8-c908-11e4-815a-0d909fe02f99.gif"></p> |
29 | 29 |
|
30 | 30 | ## Requirements
|
31 | 31 |
|
@@ -53,31 +53,78 @@ dependencies {
|
53 | 53 |
|
54 | 54 | <img src="https://developers.google.com/maps/documentation/android-sdk/images/utility-markercluster.png" width="150" align=right>
|
55 | 55 |
|
56 |
| -This repository includes a [demo app](demo) that illustrates the use of this library. |
| 56 | +This repository includes a [sample app](demo) that illustrates the use of this library. |
57 | 57 |
|
58 | 58 | To run the demo app, you'll have to:
|
59 | 59 |
|
60 | 60 | 1. [Get a Maps API key](https://developers.google.com/maps/documentation/android-sdk/get-api-key)
|
61 |
| -1. Open the file `local.properties` in the root project (this file should *NOT* be under version control to protect your API key) |
| 61 | +1. Add a file `local.properties` in the root project (this file should *NOT* be under version control to protect your API key) |
62 | 62 | 1. Add a single line to `local.properties` that looks like `MAPS_API_KEY=YOUR_API_KEY`, where `YOUR_API_KEY` is the API key you obtained in the first step
|
63 | 63 | 1. Build and run the `debug` variant for the Maps SDK for Android version
|
64 | 64 |
|
65 | 65 | ## Documentation
|
66 | 66 |
|
67 |
| -See the generated [reference docs][javadoc] for a full list of classes and their methods. |
| 67 | +See the generated javadoc [reference documentation][javadoc] for a full list of classes and their methods. |
| 68 | + |
| 69 | +## Usage |
68 | 70 |
|
69 |
| -Written guides for using the utilities are published in |
| 71 | +Full guides for using the utilities are published in |
70 | 72 | [Google Maps Platform documentation][devsite-guide].
|
71 | 73 |
|
72 | 74 | <details>
|
73 |
| - <summary><strong>Migration Guide from v0.x to 1.0</strong></summary> |
| 75 | + <summary>Marker utilities</summary> |
74 | 76 |
|
75 |
| -### Migration Guide from v0.x to 1.0 |
| 77 | +### Marker utilities |
76 | 78 |
|
77 |
| -Improvements made in version [1.0.0](https://github.com/googlemaps/android-maps-utils/releases/tag/1.0.0) of the library to support multiple layers on the map caused breaking changes to versions prior to it. These changes also modify behaviors that are documented in the [Maps SDK for Android Maps documentation](https://developers.google.com/maps/documentation/android-sdk/intro) site. This section outlines all those changes and how you can migrate to use this library since version 1.0.0. |
| 79 | +- Marker animation [source](https://github.com/googlemaps/android-maps-utils/blob/main/library/src/main/java/com/google/maps/android/ui/AnimationUtil.java), [sample code](https://github.com/googlemaps/android-maps-utils/blob/main/demo/src/main/java/com/google/maps/android/utils/demo/AnimationUtilDemoActivity.java) |
| 80 | +- Marker clustering [source](https://github.com/googlemaps/android-maps-utils/tree/main/library/src/main/java/com/google/maps/android/clustering), [guide](https://developers.google.com/maps/documentation/android-sdk/utility/marker-clustering) |
| 81 | +- Marker icons [source](https://github.com/googlemaps/android-maps-utils/blob/main/library/src/main/java/com/google/maps/android/ui/IconGenerator.java), [sample code](https://github.com/googlemaps/android-maps-utils/blob/main/demo/src/main/java/com/google/maps/android/utils/demo/IconGeneratorDemoActivity.java) |
78 | 82 |
|
| 83 | +</details> |
| 84 | + |
| 85 | +<details> |
| 86 | + <summary>Data visualization utilities</summary> |
| 87 | + |
| 88 | +### Data visualization utilities |
| 89 | + |
| 90 | +- Display heat maps [source](https://github.com/googlemaps/android-maps-utils/tree/main/library/src/main/java/com/google/maps/android/heatmaps), [guide](https://developers.google.com/maps/documentation/android-sdk/utility/heatmap) |
| 91 | +- Import GeoJSON [source](https://github.com/googlemaps/android-maps-utils/tree/main/library/src/main/java/com/google/maps/android/data/geojson), [guide](https://developers.google.com/maps/documentation/android-sdk/utility/geojson) |
| 92 | +- Import KML [source](https://github.com/googlemaps/android-maps-utils/tree/main/library/src/main/java/com/google/maps/android/data/kml), [guide](https://developers.google.com/maps/documentation/android-sdk/utility/kml) |
| 93 | + |
| 94 | +</details> |
| 95 | + |
| 96 | +<details> |
| 97 | + <summary>Polyline and spherical geometry utilities</summary> |
| 98 | + |
| 99 | +### Additional utilities |
| 100 | + |
| 101 | +- Polyline encoding and decoding [source](https://github.com/googlemaps/android-maps-utils/blob/main/library/src/main/java/com/google/maps/android/PolyUtil.java), [encoding sample](https://github.com/googlemaps/android-maps-utils/blob/main/demo/src/main/java/com/google/maps/android/utils/demo/PolySimplifyDemoActivity.java), [decoding sample](https://github.com/googlemaps/android-maps-utils/blob/main/demo/src/main/java/com/google/maps/android/utils/demo/PolyDecodeDemoActivity.java) |
| 102 | +- Spherical geometry [source](https://github.com/googlemaps/android-maps-utils/blob/main/library/src/main/java/com/google/maps/android/SphericalUtil.java), [compute distance sample](https://github.com/googlemaps/android-maps-utils/blob/main/demo/src/main/java/com/google/maps/android/utils/demo/DistanceDemoActivity.java) |
| 103 | + |
| 104 | +</details> |
| 105 | + |
| 106 | +<details> |
| 107 | + <summary>Street View metadata utility</summary> |
| 108 | + |
| 109 | +### Street View metadata utility |
| 110 | + |
| 111 | +The StreetViewUtil class provides functionality to check whether a location is supported in StreetView. You can avoid errors when [adding a Street View panorama](https://developers.google.com/maps/documentation/android-sdk/streetview) to an Android app by calling this metadata utility and only adding a Street View panorama if the response is `OK`. |
| 112 | + |
| 113 | +```kotlin |
| 114 | +StreetViewUtils.fetchStreetViewData(LatLng(8.1425918, 11.5386121), BuildConfig.MAPS_API_KEY) |
| 115 | +``` |
| 116 | + |
| 117 | +`fetchStreetViewData` will return `NOT_FOUND`, `OK` or `ZERO_RESULTS`, depending on the response. |
| 118 | + |
| 119 | +</details> |
| 120 | + |
| 121 | +<details> |
| 122 | + <summary>Migration Guide from v0.x to 1.0</summary> |
| 123 | + |
| 124 | +### Migrating from v0.x to 1.0 |
| 125 | + |
| 126 | +Improvements made in version [1.0.0](https://github.com/googlemaps/android-maps-utils/releases/tag/1.0.0) of the library to support multiple layers on the map caused breaking changes to versions prior to it. These changes also modify behaviors that are documented in the [Maps SDK for Android Maps documentation](https://developers.google.com/maps/documentation/android-sdk/intro) site. This section outlines all those changes and how you can migrate to use this library since version 1.0.0. |
79 | 127 |
|
80 |
| -## Usage |
81 | 128 |
|
82 | 129 | ### Adding Click Events
|
83 | 130 |
|
@@ -290,36 +337,24 @@ _Old_
|
290 | 337 |
|
291 | 338 | </details>
|
292 | 339 |
|
293 |
| -## Usage guide |
294 |
| - |
295 |
| -The full documentation can be found here [Google Maps Platform documentation][devsite-guide]. |
296 |
| - |
297 |
| -For a quick snippet on the StreetViewUtil class, keep reading. |
298 |
| - |
299 |
| -The StreetViewUtil class provides functionality to check whether a location is supported in StreetView. To call it, use the following snippet: |
| 340 | +## Contributing |
300 | 341 |
|
301 |
| -```kotlin |
302 |
| -StreetViewUtils.fetchStreetViewData(LatLng(8.1425918, 11.5386121), BuildConfig.MAPS_API_KEY) |
303 |
| -``` |
304 |
| - |
305 |
| -`fetchStreetViewData` will return `NOT_FOUND`, `OK` or `ZERO_RESULTS`, depending on the response. |
| 342 | +Contributions are welcome and encouraged! See the [contributing guide](CONTRIBUTING.md) for more info. |
306 | 343 |
|
307 | 344 | ## Support
|
308 | 345 |
|
309 |
| -Encounter an issue while using this library? |
| 346 | +This library is offered via an open source [license](LICENSE). It is not governed by the Google Maps Platform [Technical Support Services Guidelines](https://cloud.google.com/maps-platform/terms/tssg?utm_source=github&utm_medium=documentation&utm_campaign=&utm_content=web_components), the [SLA](https://cloud.google.com/maps-platform/terms/sla?utm_source=github&utm_medium=documentation&utm_campaign=&utm_content=web_components), or the [Deprecation Policy](https://cloud.google.com/maps-platform/terms?utm_source=github&utm_medium=documentation&utm_campaign=&utm_content=web_components) (however, any Google Maps Platform services used by the library remain subject to the Google Maps Platform Terms of Service). |
310 | 347 |
|
311 |
| -If you find a bug or have a feature request, please [file an issue]. |
312 |
| -Or, if you'd like to contribute, send us a [pull request] and refer to our [code of conduct]. |
| 348 | +This library adheres to [semantic versioning](https://semver.org/) to indicate when backwards-incompatible changes are introduced. |
313 | 349 |
|
314 |
| -You can also discuss this library on our [Discord server]. |
| 350 | +If you find a bug, or have a feature request, please [file an issue] on GitHub. |
315 | 351 |
|
316 |
| -For more information, check out the detailed guide on the |
317 |
| -[Google Developers site][devsite-guide]. |
| 352 | +If you would like to get answers to technical questions from other Google Maps Platform developers, ask through one of our [developer community channels](https://developers.google.com/maps/developer-community?utm_source=github&utm_medium=documentation&utm_campaign=&utm_content=web_components) including the Google Maps Platform [Discord server]. |
318 | 353 |
|
319 | 354 | [file an issue]: https://github.com/googlemaps/android-maps-utils/issues/new/choose
|
320 | 355 | [pull request]: https://github.com/googlemaps/android-maps-utils/compare
|
321 | 356 | [code of conduct]: CODE_OF_CONDUCT.md
|
322 |
| -[Discord channel]: https://discord.gg/hYsWbmk |
| 357 | +[Discord server]: https://discord.gg/hYsWbmk |
323 | 358 | [android-site]: https://developers.google.com/maps/documentation/android-sdk
|
324 | 359 | [devsite-guide]: https://developers.google.com/maps/documentation/android-sdk/utility
|
325 | 360 | [javadoc]: https://www.javadoc.io/doc/com.google.maps.android/android-maps-utils/latest/index.html
|
|
0 commit comments