set_locale

The set_locale function is used to set the time zone, language, date format, or tile density for the layers.

Copied!
svc=render/set_locale&params={"tzOffset":<uint>,
			      			  "language":"<text>",
			      			  "flags":<uint>,
			      			  "formatDate":"<text>",
			      			  "density":<uint>}

Parameters

NameDescription
tzOffsetTime zone.
languageLanguage (two-lettered code).
flagsMeasurement system flags (optional):
  • metric;
  • U.S.;
  •  imperial.
formatDateDate and time format (see below).
densityTile size (optional).

Date and time format:

ParameterDescription
%HThe hour of the day with a leading 0 if necessary (from "00" to "23").
%BThe full month name (from "January" to "December").
%bThe abbreviated month name (from "Jan" to "Dec").
%mThe month of the year with a leading 0 if necessary (from "01" to "12").
%lThe month of the year (from "1" to "12").
%PThe format of the Persian calendar ("01 Farvardin 1392 00:00:00").
%AThe day of the week full name (from "Monday" to "Sunday").
%aThe abbreviated day name (from "Mon" to "Sun").
%EThe day of the month with a leading 0 if necessary (from "01" to "31").
%eThe day of the month (from "1" to "31").
%IThe hour of the day with a leading 0 if necessary (from "01" to "12")
%MThe minute of the hour with a leading 0 if necessary (from "00" or "59")
%SThe seconds of the minute with a leading 0 if necessary ("00" to "59").
%pThe A.M./P.M. designator ("AM" or "PM").
%YThe full four digit year ("1999" or "2008").
%yThe year as a two-digit number ("99" or "08").

Example:

Copied!
"formatDate":"%Y-%m-%E %H:%M:%S"

Result:

Copied!
2013-01-26 12:34:56

Density:

ValueTile sizeRatio
1256*2561
2378*3781.5
3512*5122
4768*7683
51024*10244

The default tile size is 256*256.

Returned result

If the request is successful, an empty JSON is returned.

Copied!
{ }

If not, an error code is returned. Possible error codes:

CodeDescription

6

Undefined error.
4

Wrong input parameters.

Download PDF file
Download Word document

See also