public class

MapRendererListener

extends Object
java.lang.Object
   ↳ com.carto.renderers.MapRendererListener

Class Overview

Listener for specific map renderer events.

Summary

Public Constructors
MapRendererListener()
Public Methods
synchronized void delete()
void onAfterDrawFrame()
Listener method that gets called at the end of the rendering frame.
void onBeforeDrawFrame()
Listener method that gets called at the start of the rendering frame.
void onSurfaceChanged(int width, int height)
Listener method that gets called when the rendering surface initialized and its size is updated.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MapRendererListener ()

Public Methods

public synchronized void delete ()

public void onAfterDrawFrame ()

Listener method that gets called at the end of the rendering frame.
This method is called from GL renderer thread, not from main thread.

public void onBeforeDrawFrame ()

Listener method that gets called at the start of the rendering frame.
The method can be used to synchronize vector elements with renderer state, for example
to force marker to be always at the center of the screen (focus point).
This method is called from GL renderer thread, not from main thread.

public void onSurfaceChanged (int width, int height)

Listener method that gets called when the rendering surface initialized and its size is updated.
The method can be used to check when it is safe to call methods that depend on view size,
like moveToFitBounds, screenToMap, mapToScreen.
This method is called from GL renderer thread, not from main thread.