From e0252a109599138e290a1c3535ef3c416e27ddf9 Mon Sep 17 00:00:00 2001 From: Ivo Berger Date: Mon, 9 Sep 2019 15:15:22 +0200 Subject: [PATCH] improves downscale description in readme --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 84fb0af..504c0c0 100644 --- a/README.md +++ b/README.md @@ -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] @@ -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¢er=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)