utils

Available for:Map Panel

Methods

Name Summary
deserialize

Reads object from JSON

dump

Creates simple object with properties in form "xxx" instead of get_xxx() methods

getInMapCrs

Transforms screen coordinates to coordinates expressed in the current CRS

getInScreenCrs

Transforms coordinates to screen coordinates

sdump

Dumps and serializes the object to string

serialize

Serializes JSON object to String

Methods • Details

deserialize(string) → {Object}

Available for:Map Panel

Reads object from JSON

Parameters

Name Type Description
string String

JSON object as String

Returns

TypeDescription
Object

dump(object) → {Object}

Available for:Map Panel

Creates simple object with properties in form "xxx" instead of get_xxx() methods

Parameters

Name Type Description
object Object

Input object

Returns

TypeDescription
Object

getInMapCrs(config, callback) → {void}

Available for:Map Panel

Transforms screen coordinates to coordinates expressed in the current CRS

Parameters

Name Type Description
config Object
{
 "x": Number,
 "y": Number
}

Point in the screen coordinates

x

X coordinate in the screen coordinates

y

Y coordinate in the screen coordinates

callback

Callback executed on success.

Returns

TypeDescription
void

getInScreenCrs(config, callback) → {void}

Available for:Map Panel

Transforms coordinates to screen coordinates

Parameters

Name Type Description
config Object
{
 "x": Number,
 "y": Number
}

Point in the current CRS coordinates

x

X easting (longitude) coordinate in the current CRS coordinates

y

Y northing (latitude) coordinate in the current CRS coordinates

callback

Callback executed on success.

Returns

TypeDescription
void

sdump(object) → {String}

Available for:Map Panel

Dumps and serializes the object to string

Parameters

Name Type Description
object Object

Input object

Returns

TypeDescription
String

serialize(object) → {String}

Available for:Map Panel

Serializes JSON object to String

Parameters

Name Type Description
object Object

Input object

Returns

TypeDescription
String