Incorrect snaping

Dear Sir/Madam!
Please give me an advice how to solve next problem. I real new in GrappHopper and don’t understand what did wrong. I updated map with latest osm.pbf and also updated graphhopper-web version from 1.0 to 6.0 . After these updates was found that route is creating outside from road. But when I run from locahost all is great - route created correct, but problem is that grahphopper is calling from app and here is problem with incorrect snapping(?) when route is creating. Would You please help me maybe need some settings or something else to show correct route/line?
I found next code from app

    //creates linestring from graphhopper path
    getGeometryFromRoutePath: function(path) {
        var coords = [];
        path.points.coordinates.forEach(function(c) {
            coords.push(ol.proj.transform(c, gis.MapUtils.proj4326, gis.MapUtils.proj3857));
        // if only one point is returned (in case two stops added in same location), dublicate it, for valid linestring
        if(coords.length === 1){
          coords.push([coords[0][0], coords[0][1]]);
        return new ol.geom.LineString(coords);

    getGraphhopperUrl: function(){
      return gis.getApplication().getApiUrl() + 'graphhoper/route?vehicle=car&weighting=fastest&elevation=false&use_miles=false&layer=Omniscale&instructions=false&points_encoded=false';
              url: gis.getApplication().getGraphhopperUrl() + pointsUrl,
              timeout: 10000,
              method: 'GET',
              callback: function(opt, success, response) {
                  me.fetchingRoute = false;
                  if (success === true) {
                    var res = Ext.decode(response.responseText);
                    if (res["paths"] && res["paths"].length > 0) {
                        var path = res.paths[0];
                        var geom = gis.Utils.getGeometryFromRoutePath(path);
                          var line = me.getLine();

                          line.set('invisible', false);
                          if(order == null){
                            gis.Utils.getOrderedArray(me.sourceFeatures.getArray()).forEach(function(point, ind, arr) {
                                var c = ol.proj.transform(path.snapped_waypoints.coordinates[ind], gis.MapUtils.proj4326, gis.MapUtils.proj3857);
                                point.setGeometry(new ol.geom.Point(c));
                        } else {
                          var sketchLine = new ol.Feature({
                              geometry: geom
                          if(me.lastPixel && me.lastRequestedPixel && gis.Utils.pixelsFar(me.lastPixel, me.lastRequestedPixel)){
                              me.updateLineFromCurrentPoints(me.lastPixel, false);

log file:
[dw-26 - GET /route?vehicle=car&weighting=fastest&elevation=false&use_miles=false&layer=Omniscale&instructions=false&points_encoded=false&point=56.81266733892096,24.255209660544963&point=56.81157819851455,24.236209866279705&_dc=1706992073834] INFO c.g.resources.RouteResource - vehicle=car&weighting=fastest&elevation=false&use_miles=false&layer=Omniscale&instructions=false&points_encoded=false&point=56.81266733892096,24.255209660544963&point=56.81157819851455,24.236209866279705&_dc=1706992073834

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.