As discussed in #203, this issue addresses the behaviour I noticed.
The .zip-file contains a project (Visual Studio 2017, WPF) which shows that no lines are shown despite the presence of the layer containing the lines. If you comment out Line 63 (the line which adds the _coastLayer to the MapControl), you can toggle the lines on or off.
Your problem is the line generation. First you interchanged latitude and longitude. Than you used ToLonLat() instead of FromLonLat. The result is, that the lines are drawn, but with very, very small values around 0/0.
The correct code to see some lines is
````
static IEnumerable
{
var list = new List
for (int lon = -180; lon <= 180; lon += 5)
{
var lineString = new LineString();
for (int lat = -80; lat <= 80; lat += 5)
{
var point = new Point(lon, lat);
var lonlat = SphericalMercator.FromLonLat(lat, lon);
lineString.Vertices.Add(lonlat);
}
list.Add(lineString);
}
return list;
}
````
If I use this code, I see lines :)
Btw. you didn't saw the lines with shape file, because Mapsui changed the resolution, if you add the ShapeFile. So with ShapeFile zoom on shape, without ShapeFile zoom on tiny grid lines.
Wow. Feeling a bit dump rn. Thanks! That fixed it...
Oh, not dump. I had this often. If you look to long on your own code, you will see anything :)
Great that I could help.
@charlenni Thanks for the solution
@MCMainiac Thanks for the sample project. This makes it go so much faster.
Most helpful comment
Your problem is the line generation. First you interchanged latitude and longitude. Than you used ToLonLat() instead of FromLonLat. The result is, that the lines are drawn, but with very, very small values around 0/0.
The correct code to see some lines is GenerateLines()();
````
static IEnumerable
{
var list = new List
````
If I use this code, I see lines :)