Nokia Maps API Reference

Contents

Interface nokia.maps.clustering.IClusterPoint

Interface Summary

This interface defines properties for a data point that can be used in clustering. Each data point used for clustering purposes must conform to this interface.

Field Summary
Number | undefined altitude This property holds the value of altitude in meters.
Number latitude This property holds the value of latitude as a numeric value in the range from -90 (south) to +90 (north) degrees.
Number longitude This property holds the value of longitude as a numeric value in the range from -180 (west) to +180 (east) degrees.
Number value Optional This property holds a numeric value that indicates the "weight" of the the data point within the cluster.
Direct Inheritance
Field Detail
Number value Optional
This property holds a numeric value that indicates the "weight" of the the data point within the cluster. Weight is used to determine the position of the marker that represents the cluster in relation to the data points (markers) included in the cluster. Positioning the cluster marker by weight means that it is placed closer to the data points (markers) with the highest value (this property) than to any others. It is the default way to position the cluster marker, the other options being "center" and "first". "Center" ensures that the cluster marker is placed in the center of the cluster, while "first" means that the position of the cluster marker coincides with the first data point (marker) in the cluster.

You can determine the position of the cluster marker explicitly when initializing nokia.maps.clustering.MarkerTheme. To do that, set the property "position" on an instance of nokia.maps.clustering.MarkerTheme.Options#position - the object is the argument to the MarkerTheme constructor. The example below demonstrates how to set weight-based positioning, using a constant defined on the class nokia.maps.clustering.MarkerTheme:

	var map = new nokia.maps.map.Display(...);
	clusterProvider = new nokia.maps.clustering.ClusterProvider(map, {
		theme : new nokia.maps.clustering.MarkerTheme({
			position: nokia.maps.clustering.MarkerTheme.POSITION_WEIGHT_CENTER
		})
	});

Note that if value is not set on any of the data points in the cluster, you can improve clustering performance by specifying "center" as the configuration setting for MarkerTheme, while achieving a similar visual effect as that created by "weight".

Default Value:
1
Documentation generated on Thu Aug 30 2012 10:10:46 GMT+0200 (CEST).