top of page

K.32 Map Viewer Control

The Map Viewer Control is a .NET control "TedTycoon" wrote in C# in late 2008. The control can display a height map of a Populous map. Other applications can place the control on the form and then pass it a byte array of the map or a path to a file of which the map viewer will load. You can also drag the map around to change the centre point of the map.

 

You can add the Map Viewer dll as a reference to any .NET Framework project. Once you've added it, you can add the control to your windows form and then set the properties to the right values. The dll can also be added to your toolbox, if you want it to appear on your control toolbox.

To set the map of the viewer, call the method OpenMap with a path, stream or byte array. This will then display the map instantly after you call it. You can also change the colour scheme by setting the Hue and Sat properties. The land height is distinguished by changing the luminosity. You can also change the colour of the water by setting the WaterColour property. If you want to change the starting point of the map or the size of the map, set the properties MapStartPos and MapScaleShowObjects can be changed to toggle whether the objects are displayed or hidden.

bottom of page