17

I am writing a WinForms app using GMap.NET Windows Forms. I noticed that the map is finite. It does not show anything to the east of Australia, for example:

enter image description here

Notice the white bit on the right.

This is my code to create the map (not including the markers):

// gmap is a field generated by the WinForms designer
gmap.MapProvider = GoogleMapProvider.Instance;
GMaps.Instance.Mode = AccessMode.ServerAndCache;
gmap.MinZoom = 1;
gmap.MaxZoom = 5;
gmap.Position = new PointLatLng(0, 0); // initial position is (0, 0), I moved it to the east

gmap.ShowCenter = false;

I want the map to behave similar to Google Maps - if I keep moving east, I will move past Australia and see South America again.

I looked around on the Internet for "gmap.net infinite" and similar keywords. All I could find was this, which is about the map being shown on only part of the GMapControl. On the other hand, I want the map to continue infinitely. Maybe I was not using the correct terminology for this.

How can I make the map continue infinitely?

I have also thought of limiting the area that the user can see so that the user never sees the white bits, but all I could find was this unanswered question.

Sweeper
  • 213,210
  • 22
  • 193
  • 313
  • 1
    Maybe it depends on the provider? Did you try with the OpenStreetMapProvider? – rene Jun 09 '18 at 15:16
  • I tried both OpenStreetMapProvider and BingMapProvider. Both shows the same thing. I am starting to think that this is not supported in GMaps.NET @rene – Sweeper Jun 09 '18 at 15:19
  • Judging from implementation of i.e. [Mercator projection](https://github.com/radioman/greatmaps/blob/799f3a38a65350ff00c21acf9b88c96848bb3880/GMap.NET.Core/GMap.NET.Projections/MercatorProjection.cs#L52) and [PureProjection.Clip](https://github.com/radioman/greatmaps/blob/799f3a38a65350ff00c21acf9b88c96848bb3880/GMap.NET.Core/GMap.NET/PureProjection.cs#L414) this framework is meant to clip the maps to bounds rather than wrap them around, sorry :/ – orhtej2 Jun 13 '18 at 21:24
  • @orhtej2 So are there other NuGet packages that I can use to display an infinite map? – Sweeper Jun 14 '18 at 06:40

1 Answers1

1

I found this in discussion section. They said that this feature does not implemented yet

https://github.com/radioman/greatmaps/issues/29

Yigit Pilevne
  • 506
  • 6
  • 14