From fc1a907a178ee18362296502dd77219c0a145357 Mon Sep 17 00:00:00 2001 From: samanpwbb Date: Tue, 3 Mar 2015 18:57:13 -0500 Subject: [PATCH 1/2] document render options --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 39a556999e1..975d6ff65a4 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,20 @@ map.render({}, function(err, image) { }); ``` +The first argument passed to `map.render` is an options object, all key are optional: + +```js +{ + zoom: {zoom}, // number, defaults to 0 + width: {width}, // number (px), defaults to 256 + height: {height}, // number (px), defaults to 256 + latitude: {latitude}, // number (coordinate), defaults to 0 + longitude: {longitude}, // number (coordinate), defaults to 0 + bearing: {bearing}, // number (degree), defaults to 0 + ratio: {ratio} // number (scale factor), defaults to 1.0 +} +``` + ## Testing ``` From ae4831d75fc54fb05cecdf8f1407faea56275aef Mon Sep 17 00:00:00 2001 From: Saman Bemel-Benrud Date: Tue, 3 Mar 2015 22:02:58 -0500 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 975d6ff65a4..d8a2353bf82 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ map.render({}, function(err, image) { }); ``` -The first argument passed to `map.render` is an options object, all key are optional: +The first argument passed to `map.render` is an options object, all keys are optional: ```js {