It didn't work by increasing OnlineMapsUtils.maxRaycastDistance.
I've worked around it by creating a new script calling this function when a button is clicked instead of using the example script.
public void SetRealSize() {
// Get distance (km) between corners of map
Vector2 distance = OnlineMapsUtils.DistanceBetweenPoints(OnlineMaps.instance.topLeftPosition,
OnlineMaps.instance.bottomRightPosition);
// Set tileset size
OnlineMaps.instance.tilesetSize = distance * 1000;
// Redraw map
OnlineMaps.instance.Redraw();
SetCenterPosition();
}
I attached a screenshot of the Online Maps component.
Edit: I still get some problems it seems like. Control is lost whenever zoom gets to 15 or 19 for some reason.
Just as a test I did this which stops all control at 15 or 19 zoom:
private void Update() {
if(zoomValue != onlineMaps.zoom) {
SetRealSize();
}
zoomValue = onlineMaps.zoom;
}
public void SetRealSize() {
// Get distance (km) between corners of map
Vector2 distance = OnlineMapsUtils.DistanceBetweenPoints(OnlineMaps.instance.topLeftPosition,
OnlineMaps.instance.bottomRightPosition);
// Set tileset size
OnlineMaps.instance.tilesetSize = distance * 1000;
// Redraw map
OnlineMaps.instance.Redraw();
SetCenterPosition();
}
Edit 2: For some reason it works better with having Use Elevation set to true. I can go between 11 and 20 without the losing user control.
Edit 3: Updated to the latest version but I still have the same problem.