set_locale
The set_locale function is used to set the time zone, language, date format, or tile density for the layers.
svc=render/set_locale¶ms={"tzOffset":<uint>,
"language":"<text>",
"flags":<uint>,
"formatDate":"<text>",
"density":<uint>}
Parameters
Name | Description |
---|---|
tzOffset | Time zone. |
language | Language (two-lettered code). |
flags | Measurement system flags (optional):
|
formatDate | Date and time format (see below). |
density | Tile size (optional). |
Date and time format:
Parameter | Description |
---|---|
%H | The hour of the day with a leading 0 if necessary (from "00" to "23"). |
%B | The full month name (from "January" to "December"). |
%b | The abbreviated month name (from "Jan" to "Dec"). |
%m | The month of the year with a leading 0 if necessary (from "01" to "12"). |
%l | The month of the year (from "1" to "12"). |
%P | The format of the Persian calendar ("01 Farvardin 1392 00:00:00"). |
%A | The day of the week full name (from "Monday" to "Sunday"). |
%a | The abbreviated day name (from "Mon" to "Sun"). |
%E | The day of the month with a leading 0 if necessary (from "01" to "31"). |
%e | The day of the month (from "1" to "31"). |
%I | The hour of the day with a leading 0 if necessary (from "01" to "12") |
%M | The minute of the hour with a leading 0 if necessary (from "00" or "59") |
%S | The seconds of the minute with a leading 0 if necessary ("00" to "59"). |
%p | The A.M./P.M. designator ("AM" or "PM"). |
%Y | The full four digit year ("1999" or "2008"). |
%y | The year as a two-digit number ("99" or "08"). |
Example:
"formatDate":"%Y-%m-%E %H:%M:%S"
Result:
2013-01-26 12:34:56
Density:
Value | Tile size | Ratio |
---|---|---|
1 | 256*256 | 1 |
2 | 378*378 | 1.5 |
3 | 512*512 | 2 |
4 | 768*768 | 3 |
5 | 1024*1024 | 4 |
The default tile size is 256*256.
Returned result
If the request is successful, an empty JSON is returned.
{ }
If not, an error code is returned. Possible error codes:
Code | Description |
---|---|
6 | Undefined error. |
4 | Wrong input parameters. |