Deep Map SDK Web

Routing

Live example

Requirements

The Routing Service URL must be provided in the config:

var config = {};
config.mapServiceUrl = "https://ssp.deepmap.de/geo";
config.routeServiceUrl = "https://ssp.deepmap.de/routingservice";
config.projectName = "campushd";
config.lang = "de";
map = DeepMapFactory.bootstrap(config);

Routing from Feature to Feature by Original Serial

It's possible to route from one feature to another using their original serials. The following example will draw the route on the map and zoom to it with an animation.

map.getRouteWithOriginalSerials("stand_manual_8032", "stand_manual_809", true, true, true);

Routing from Point to Point

Routing from Point to Point is also possible:

var startRoutePoint = {
    lng: 8.6685557,
    lat: 49.4186050484,
    level: 0,
};
var endRoutePoint = {
    lng: 8.672886187,
    lat: 49.417546901,
    level: 0
};
map.getRouteByRoutePoint(startRoutePoint, endRoutePoint, true, true, true);