Show/Hide Toolbars

By setting the focus to a specific point on the map MappRover will automatically adjust rotation, view port and scale of the map. The user can initiate setting the focus by long-pressing on a specific position on the map and selecting Set focus in the appearing menu. The position (X, Y coordinates) on which the user long-pressed will the be used as input to the logic that sets the focus.

The actual focus will be determined differently depending on whether the pressed X,Y coordinates are contained within an existing mapping event or are outside of all mapping events.

Not in a mapping event

If the pressed position on the map (X, Y coordinates) are not within an existing mapping event following logic is used to set the focus.

Get nearest axis point from given coordinates: the nearest orthogonal projection point from the given coordinates to the axis is determined. If no orthogonal projection can be found the focus cannot be set.

Bearing of the axis at the nearest orthogonal projection point is determined

Rotation of map view is set so that the tangent of the axis at the nearest orthogonal projection point, points upwards (12 o'clock position)

The map view is zoomed to a 1:200 scale

The viewport is set so that the nearest orthogonal projection point is in the center of the screen.

In a mapping event

If the pressed position on the map (X, Y coordinates) is within the boundaries of an existing mapping event following logic is used to set the focus.

The centroid of the mapping event is determined. The centroid can be thought of as the "center of gravity" the point around which the area contained by the polygon is evenly distributed. The position of the centroid is derived mathematically from a calculation based on the overall shape of the geometry.

Get the nearest axis point for the centroid: the neares ortogonal projection point from the centroid to the axis is determined. If no orthogonal projection can be found the f

Get nearest axis point for that center (

Rotate around nearest axis point (according to bearing of axis)

Set scaling to 1:200

 

© 2021 AFRY Austria GmbH, www.redbex.com