| 180 | } |
| 181 | |
| 182 | void Framework::OnLocationUpdate(GpsInfo const & info) |
| 183 | { |
| 184 | #ifdef FIXED_LOCATION |
| 185 | GpsInfo rInfo(info); |
| 186 | |
| 187 | // get fixed coordinates |
| 188 | m_fixedPos.GetLon(rInfo.m_longitude); |
| 189 | m_fixedPos.GetLat(rInfo.m_latitude); |
| 190 | |
| 191 | // pretend like GPS position |
| 192 | rInfo.m_horizontalAccuracy = 5.0; |
| 193 | |
| 194 | if (m_fixedPos.HasNorth()) |
| 195 | { |
| 196 | // pass compass value (for devices without compass) |
| 197 | CompassInfo compass; |
| 198 | m_fixedPos.GetNorth(compass.m_bearing); |
| 199 | OnCompassUpdate(compass); |
| 200 | } |
| 201 | |
| 202 | #else |
| 203 | GpsInfo const & rInfo = info; |
| 204 | #endif |
| 205 | |
| 206 | m_routingManager.OnLocationUpdate(rInfo); |
| 207 | |
| 208 | bool const isRoutingActive = m_routingManager.IsRoutingActive(); |
| 209 | |
| 210 | if (m_wasRoutingActive != isRoutingActive) |
| 211 | { |
| 212 | m_wasRoutingActive = isRoutingActive; |
| 213 | |
| 214 | /// State changed (Started OR Stopped) -> Refresh 3D Buildings |
| 215 | Refresh3dMode(); |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | void Framework::OnCompassUpdate(CompassInfo const & info) |
| 220 | { |
nothing calls this directly
no test coverage detected