Function Overview
GCCluster Object
Description:
The GCCluster object defines all functions you need to modify or get/set attributes to the cube/cloud cluster overlay on your map. This is the same for cubes and cloud clustering. GCCluster is a customized GOverlay object, so you can also add different GEvent's to it.

Member Functions:
setImage(string url)
Change the image url/path of the cluster.

getClusterCountDIV(void)
Returns the number of points from this cluster.

getLatLng(void)
Returns GLatLng object with the central coordinates of the cluster.
gcGrid Class
Description:
This is the central class of the geocubes API. It contains all functionality to control the clusters and points on your map. You need to call the constructor to use the functions of the API. Please do not forget to call the function enableRenderGrid after you set all options to geocubes. This enables the rendering of the clusters and points to your map.

Example:
// create geocubes object
// variable map is your GMap2 object
var gcGridObj = new gcGrid(map, "GEOCUBES_API_KEY");

Member Functions:
setRendering(var type)
geocubes supports two clustering algorithms. You can switch between point clouds and cubes. You have also the possibility to change it at runtime. The default clusering algorithm is always cubes. Please note: geocubes have different callback names for clouds and cubes, e.g. GC_CB_ONCREATECLOUD and GC_CB_ONCREATECLUSTER

setIcon(var type, GIcon icon)
If you want to change the design of your icons for points and clusters you have to use this function. There are different constants for the several icon types.

setOption(var type, int on_off)
This function changes options of geocubes. The parameter "on_off" can be 0 for disable or 1 for enable.

setVar(var type, mixed value)
This function is used to set several variables. You can find the different variable types under constants below.

setCallback(var type,
function cb_func)
For several events in your map you can define own functions that will be called by the API. You can set them by using setCallback. The first parameter is the constant for an event type and the second is your custom function. You will find the event types that are supported by the API under constants. Depending on the event the geocubes API will deliver different parameters to your function. They are described further below.

enableRenderGrid(void)
To initialize the rendering of clusters and points to your map call this function. Until you call this function your map will be empty but please set all options and callbacks before.

disableRenderGrid(void)
The function disableRenderGrid deactivates the rendering of clusters and points by geocubes. It will clear your map from all overlays. This function does not destroy or desctruct the geocubes object. To reactivate rendering easily call enableRenderGrid.

zoomIn(GLatLng coordinate)
Zoom Function of geocubes if you click on a cluster. May be needed if you set callback function for GC_CB_CLUSTERCLICK_RAW which revokes zooming.

getTotalCount(void)
Returns the whole amount of points which are in the visible area of the map. (number of visible single points + number of points of each cluster)

orFilter(int field, int operator,
int value)
Function orFilter means that one of these values can occur, if you set more than ones.

orFilterRelease(int field,
int operator, int value)
orFilterRelease releases the filters that you set before.

andFilter(int field, int operator,
int value)
Function andFilter means that all values must occur.

andFilterRelease(int field,
int operator, int value)
Function andFilterRelease releases the filters that you set before.

renderFilter(void)
After you set one or more filters you have to call the function renderFilter so that the geocubes overlay on your map is reloaded and the filters become active.

textFilter(string value)
Text Filtering for the free text field you can set by the geocubes client library. It searches all geo-points that CONTAINS "value" in the free text field.

textFilterRelease(void)

releaseFilters(void)
Release all filters you set by functions andFilter, orFilter, textFilter.