Визиком карты

API reference

Services

VRemoteCall VRoute VEdge

Class VRemoteCall

Static class to call remote methods of GIS server.

Method Description
request(<String> method, arguments[]..., <function> callback) Remote method invocation.

List of remote methods:

route

Calculate route.
Returns value: VRoute

Example

VRemoteCall.request("route", {
    lng: 30.51127413,
    lat: 50.45504171
},{
    lng: 30.52127413,
    lat: 50.46504171
},
function callback(route) {
    map.add(route);
    map.repaint();
}
);

to contents

Class VEdge

Edge of route. Inherited from VLine.

JSON:

{
    coords: [{lng: 30.5214, lat: 50.4650}, {lng: 30.5114, lat: 50.4550}],
    type : "edge",
 
    name: "Киев Трухановская ул.",
    distance: "716",
}

Constructors

Constructor
VEdge([{lng, lat}, ...]> points)

Methods

Metho Return Description
distance() <int>  Returns the distance in meters.
name() <String>  Returns the name of the edge.

to contents

Класс VRoute

Route.

Constructors

Constructor
VRoute(<VEdge[]> edges)

Methods

Method Return Description
distance() float Returns the distance of the route.

to contents