White lines when zooming

Topics: Help
Jun 8, 2012 at 9:02 AM

Hi guys,

for my software I need the ability to freely change the visible rectangle on the map. So I realized a Zoom-functionality quite similar to the demo:

            // Configure Map-Controller
            mapController.MinZoom = 2;
            mapController.MaxZoom = 10;
            /* mapController.Zoom = 2; // See below! */
            mapController.ShowCenter = false;

            // Adjust Zoom
            barZoom.Minimum = 0;
            barZoom.Maximum = 100;
            barZoom.TickFrequency = 5;
            barZoom.Value = barZoom.Minimum;

// ...

        private void barZoom_ValueChanged(object sender, EventArgs e)
            // Change zoom level
            mapController.Zoom = (barZoom.Value/100.0)*mapController.MaxZoom;
            groupDisplay.Text = mapController.Zoom.ToString();

        private void mapController_OnMapZoomChanged()
            // Update trackbar position
            barZoom.Value = (int)((mapController.Zoom / (double)mapController.MaxZoom)*100.0);
Unfortunately the zoom does not work properly: When the .Zoom-value is not an integer number (e.g. if it's 2.3) I get white lines between the tiles (see http://i.imgur.com/sorQD.png) and I cannot drag the map with my mouse anymore. When it's an integer number, e.g. 3.0, everything works fine.

Does anyone have a solution for this?

I'm using the Hot Build from May 11th but had similar issues with a build from February.


Jun 8, 2012 at 9:11 AM

yes, there are issues at floating zoom values...

Jun 8, 2012 at 9:14 AM

Okay. Any solution for this? In the demo it works fine, though...

Jun 8, 2012 at 9:52 AM

are you sure?

Jun 8, 2012 at 1:45 PM

I was. Then I checked again and you're right. It doesn't work in the demo either.

Do you have any idea where I could start to fix it?