Offset auto center

Bill Chadwick shared this idea 2 months ago
Completed

When Locus is auto centring its map whilst travelling, it would be useful to offset the map centre so that more map is shown in the area ahead. To do this, offset the map centre by say 1/4 of the map width and height with the offset position traversing an ellipse according to GPS heading. In my own apps I have used code like this (when moving at say more than 2 kmph)


                float theta = getGpsHeading();
                theta -= 90F;
                theta = (theta < 0F) ? theta + 360F : theta;
                offsetX = (int) (-mMapView.getWidth() / 4 * Math.cos(Math.toRadians(theta)));
                offsetY = (int) (-mMapView.getHeight() / 4 * Math.sin(Math.toRadians(theta)));

Best Answer
photo

Switch on automatic rotation. I wouldn't want to be without it. I only switch it off when I'm looking for something.

Replies (3)

photo
1

Hello Bill,

this option already exists in the app. App needs to have enabled GPS and has enabled centering and rotation. Then app settings > Controlling > Map screen > Shift map cursor should work as expected.

photo
1

Why the restriction for rotation? With a raster map, I don't want to use rotation. Thanks, Bill.

photo
1

Because what is the benefit of shifted map without rotation in the direction of travel?

photo
1

So that more map is on screen in the ahead direction.

photo
1

If I am heading at 45 degrees, self marker is towards bottom left. If I am heading at 135 degrees, self marker is towards top left, 225 top right, 315 bottom right.

photo
1

Switch on automatic rotation. I wouldn't want to be without it. I only switch it off when I'm looking for something.

photo
1

Because I don't want my raster map upside down, especially its text.

photo
1

Hello Bill,

understand, thanks. This option partially still exists in the Locus Classic version. Just long-click on the bottom left centering button and choose "Set custom GPS center". Just place your current cursor location on the screen where you would like to have it fixed.

In the new Locus Map 4 app this feature no longer exists and it is not planned.

photo
Leave a Comment
 
Attach a file