CartoType .NET API 7.8.2, 2022-03-25
for development in C#, Visual Basic and other .NET languages
|
A class to draw a map using OpenGL ES. More...
#include <CartoTypeWrapper.h>
Public Member Functions | |
MapRenderer (Framework^ aFramework, IntPtr aWindowHandle) | |
Creates a MapRenderer object by providing a Framework and the handle of the window into which the map is to be drawn. You can get the handle using the Handle property of the window. The map is drawn automatically at 25 frames per second while the MapRenderer object exists. | |
void | Draw () |
Draws the map using OpenGL ES. | |
bool | Valid () |
Returns true if this MapRenderer is valid. If false is returned, graphics acceleration is not enabled. | |
bool | Enable (bool aEnable) |
Enables or disables drawing by a separate thread. Returns the previous state. More... | |
A class to draw a map using OpenGL ES.
Create a MapRenderer object by passing it a Framework and the handle of the window into which the map is to be drawn. You can get the handle using the Handle property of the window. The map is drawn automatically at 20 frames per second while the MapRenderer object exists.
You should destroy the map renderer manually by calling MapRenderer.Dispose() (in C#) from the Dispose function of your Form class before the map framework is destroyed.
bool CartoType::MapRenderer::Enable | ( | bool | aEnable | ) |
Enables or disables drawing by a separate thread. Returns the previous state.
This function is intended for users who need the full capacity of the GPU for a period when drawing is unnecessary. When drawing is disabled, draw events can be handled by calls to Draw, but it is also necessary to create a timer to redraw occasionally (e.g., once per second) to allow missing tiles to be created and drawn after pans, zooms and other changes affecting the display.