0

I need to show a map that can pan forever horizonitally.

Is it possible for me set it so that the TileLayer rolls over to show the other side of the world on panning past the end of the map?

Samuel Liew
  • 76,741
  • 107
  • 159
  • 260

1 Answers1

0

This is not possible yet (in Mapsui 1.0.11) and there are no short term plans to implement this.

pauldendulk
  • 1,378
  • 12
  • 23
  • Hi Paul, If I were to edit the source code to match the bounds to a max bounds such that it used a modulus % operation to get the tile x % max tile width would that work? And if so how would I work out the max tiles based on the zoom level and the geo coordinates, I am happy to do this a pull request if it seems feasible. Thanks – Mark William Radcliffe Sep 13 '17 at 22:37
  • It is not easy. It needs modifications to the renderer which has to repeat its rendering, perhaps multiple times. It also needs modifications to the data fetching, where both sides of the international date line need to be fetched. – pauldendulk Sep 14 '17 at 17:09
  • 1
    Hi Paul, I have done it and got it working well, would you like me to share the changes I made with you some how? I was able to get it to work using a fetcher, urirequester, a custom schema that inherits globalsphericalmercator and a viewport changed event. It wraps to infinity now. – Mark William Radcliffe Sep 15 '17 at 01:28
  • I also used your recent implementation of the viewport limitter so that it will not go below the bottom/above the top of world. – Mark William Radcliffe Sep 15 '17 at 01:30
  • oh, wow, that sounds great. You could fork Mapsui from on github and publish your changes in that fork. – pauldendulk Sep 15 '17 at 09:47
  • @MarkWilliamRadcliffe I am looking to do this also did you ever share your code to achieve this before I try and re-invent the wheel. – Clifford Agius Sep 26 '18 at 13:42