Exemplo n.º 1
0
 shared_ptr<IRouter> CreatePedestrianRouter(Index & index,
                                            storage::CountryInfoGetter const & infoGetter)
 {
   auto countryFileGetter = [&infoGetter](m2::PointD const & pt)
   {
     return infoGetter.GetRegionFile(pt);
   };
   unique_ptr<IRouter> router = CreatePedestrianAStarBidirectionalRouter(index, countryFileGetter);
   return shared_ptr<IRouter>(move(router));
 }
Exemplo n.º 2
0
 shared_ptr<OsrmRouter> CreateOsrmRouter(Index & index,
                                         storage::CountryInfoGetter const & infoGetter)
 {
   shared_ptr<OsrmRouter> osrmRouter(new OsrmRouter(
       &index, [&infoGetter](m2::PointD const & pt)
       {
         return infoGetter.GetRegionFile(pt);
       }
       ));
   return osrmRouter;
 }