MCPcopy Create free account
hub / github.com/comaps/comaps / UpdateMyPosition

Method UpdateMyPosition

libs/map/traffic_manager.cpp:193–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193void TrafficManager::UpdateMyPosition(MyPosition const & myPosition)
194{
195 // Side of square around |myPosition|. Every mwm which is covered by the square
196 // will get traffic info.
197 double constexpr kSquareSideM = 5000.0;
198 m_currentPosition = {myPosition, true /* initialized */};
199
200 if (!IsEnabled() || IsInvalidState() || m_isPaused)
201 return;
202
203 m2::RectD const rect = mercator::RectByCenterXYAndSizeInMeters(myPosition.m_position, kSquareSideM / 2.0);
204 // Request traffic.
205 UpdateActiveMwms(rect, m_lastRoutingMwmsByRect, m_activeRoutingMwms);
206
207 // @TODO Do all routing stuff.
208}
209
210void TrafficManager::UpdateViewport(ScreenBase const & screen)
211{

Callers 2

OnLocationErrorMethod · 0.80
OnUserPositionChangedMethod · 0.80

Calls 1

Tested by

no test coverage detected