Beispiel #1
0
QList< std::shared_ptr<const OsmAnd::Road> > OsmAnd::RoadLocator_P::findRoadsInAreaEx(
    const PointI position31,
    const double radiusInMeters,
    const RoutingDataLevel dataLevel,
    const ObfRoutingSectionReader::VisitorFunction filter,
    QList< std::shared_ptr<const ObfRoutingSectionReader::DataBlock> >* const outReferencedCacheEntries) const
{
    QList< std::shared_ptr<const Road> > roadsInBBox;

    const auto bbox31 = (AreaI)Utilities::boundingBox31FromAreaInMeters(radiusInMeters, position31);
    const auto obfDataInterface = owner->obfsCollection->obtainDataInterface(
        &bbox31,
        MinZoomLevel,
        MaxZoomLevel,
        ObfDataTypesMask().set(ObfDataType::Routing));
    obfDataInterface->loadRoads(
        dataLevel,
        &bbox31,
        &roadsInBBox,
        nullptr,
        nullptr,
        owner->cache.get(),
        outReferencedCacheEntries,
        nullptr,
        nullptr);

    return findRoadsInArea(
        roadsInBBox,
        position31,
        radiusInMeters,
        filter);
}
QList< std::shared_ptr<const OsmAnd::Model::Road> > OsmAnd::RoadLocator::findRoadsInArea(
    const PointI position31,
    const double radiusInMeters,
    const RoutingDataLevel dataLevel) const
{
    return findRoadsInArea(position31, radiusInMeters, dataLevel);
}