Java stack overflow

THE ERROR: Runtime Error
java.lang.StackOverflowError: stack size 8188KB
Note: You will not see another error reported for 5 seconds.

how to fix this?

You are adding "routes" list into "routes" list...that is generating the error....when you try to set it to the LineString.Points

maybe it would be "currentLong"?

1 Like

This is the first time I have seen someone creating an Ouroborous by accident on this board.

The Ouroborous is the mythical worm that eats its own tail

By the way, are you sure the map center needs a text JOIN of lat and long at the very last block in your post?
How would it know where the digits of one end and the other begin?

It would need a comma , between the two coordinates...