OsmAnd::GeoInfoPresenter::RoutelineMapObject::RoutelineMapObject( const std::shared_ptr<const GeoInfoDocument>& geoInfoDocument_, const std::shared_ptr<const GeoInfoDocument::Route>& route_) : MapObject(geoInfoDocument_) , route(route_) { points31.resize(route->points.size()); auto pPosition31 = points31.data(); for (const auto& routepoint : constOf(route->points)) *(pPosition31++) = Utilities::convertLatLonTo31(routepoint->position); computeBBox31(); if (!route->name.isEmpty()) { captionsOrder.push_back(defaultAttributeMapping->nativeNameAttributeId); captions[defaultAttributeMapping->nativeNameAttributeId] = route->name; } attributeIds.append(defaultAttributeMapping->routelineAttributeId); }
OsmAnd::GeoInfoPresenter::TracklineMapObject::TracklineMapObject( const std::shared_ptr<const GeoInfoDocument>& geoInfoDocument_, const std::shared_ptr<const GeoInfoDocument::Track>& track_, const std::shared_ptr<const GeoInfoDocument::TrackSegment>& trackSegment_) : MapObject(geoInfoDocument_, trackSegment_->extraData) , track(track_) , trackSegment(trackSegment_) { points31.resize(trackSegment->points.size()); auto pPosition31 = points31.data(); for (const auto& trackpoint : constOf(trackSegment->points)) *(pPosition31++) = Utilities::convertLatLonTo31(trackpoint->position); computeBBox31(); if (!track->name.isEmpty()) { captionsOrder.push_back(attributeMapping->nativeNameAttributeId); captions[attributeMapping->nativeNameAttributeId] = track->name; } attributeIds.append(std::static_pointer_cast<const AttributeMapping>(attributeMapping)->tracklineAttributeId); }