How can I make the map be infinite in GMap.NET?
Asked Answered
V

1

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.

Viridescent answered 9/6, 2018 at 15:1 Comment(4)
Maybe it depends on the provider? Did you try with the OpenStreetMapProvider?Sacrarium
I tried both OpenStreetMapProvider and BingMapProvider. Both shows the same thing. I am starting to think that this is not supported in GMaps.NET @SacrariumViridescent
Judging from implementation of i.e. Mercator projection and PureProjection.Clip this framework is meant to clip the maps to bounds rather than wrap them around, sorry :/Chrismatory
@Chrismatory So are there other NuGet packages that I can use to display an infinite map?Viridescent
S
1

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

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

Seessel answered 6/10, 2020 at 14:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.