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

Service "Route".

Service "Route" allows to calculate automobile route by means of JavaScript.

Attention! This service requires authorization

The service requires connecting of the following script:

<script type="text/javascript" src="http://maps.visicom.ua/api/2.0.0/services/route.js"></script>

Route calculation is to be invoked by the use of remote requests machanism VRemoteCall.

Example:

Display in browser:

Source code:

var map;
map = new VMap(document.getElementById('viewport'));
var point = {lng: 30.5112, lat: 50.4550};
map.center(point, 12);
 
// ...
 
VMap.AUTH_KEY = "AUTHORITYKEY";
VRemoteCall.request("route", {
    lng: 30.5112,
    lat: 50.4550
},{
    lng: 30.5212,
    lat: 50.4650
},
function callback(route) {
    map.add(route);
    map.repaint();
}
);