Skip to content

Commit

Permalink
improves downscale description in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ivoberger committed Sep 9, 2019
1 parent 7dab939 commit e0252a1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The implementation follows [Google's officical specifications][google-api-specs]
* [x] Automatic check that map size is within [bounds][google-api-imagesize] (supports [premium plan][google-maps-premium])
* [x] Typesafe paremters: center, markers, path, viewport, zoom level, scale, map type, image format
* [x] Encode path using [Google's algorithm][google-enc-algo]
* [ ] Automatically downscale image size preserving the ratio (default API behavior is to cut it off)
* [x] Automatically downscale image size preserving the ratio (default API behavior is to cut it off)
* [ ] [Specify locations][google-api-locations] using city names and other addresses
* [ ] Style markers and paths
* [ ] Set a [custom map stype][google-maps-styling]
Expand All @@ -30,7 +30,9 @@ val staticMap = StatikGMapsUrl("yourApiKey") {
val mapUrl = staticMap.toString()
// Result: https://maps.googleapis.com/maps/api/staticmap?key=yourApiKey&size=500x250&scale=2&center=0.0,0.0&zoom=4&markers=51.507222,-0.1275|52.5069704,13.2846501|48.8589507,2.2770204
```
Images are automatically downscaled while preserving the aspect ratio. It is possible to disable this behavior by setting `downscale = false`
The size parameter is automatically downscaled to fit within Google's restrictions while preserving the aspect ratio.
The `premiumPlan` and `scale` parameters are taken into account when deciding of downscaling is necessary.
It is possible to disable this behavior by setting `downscale = false`.

## Download [![](https://jitpack.io/v/com.ivoberger/StatikGMapsAPI.svg)](https://jitpack.io/#com.ivoberger/StatikGMapsAPI)

Expand Down

0 comments on commit e0252a1

Please sign in to comment.