Ovi Maps API Reference

Contents

Class ovi.mapsapi.util.Strip

Class Summary

A special array that contains objects, but all objects must have the same type and the same properties. The objects will not be added into the array as objects, the array contains just the values of the properties of the objects being added to the array. So each objects allocates for every property one slot in the array. Therefore if the objects being located in the array have two properties called "x" and "y", then the length of the array will be two times the amount of objects added to it.

new ovi.mapsapi.util.Strip (names, [data])
Method Summary
static stencil (template, [data]) Creates a new Strip by reusing the meta data of an existing Strip and an optional data array.
Field Summary
static ovi.mapsapi.util.Strip LAT_LNG A template for ["latitude", "longitude"] strips.
static ovi.mapsapi.util.Strip X_Y A template for ["x", "y"] strips.
Object[] data The values of the array.
String[] names An array that contains the names of the properties of the objects contained in the array.
Object offsets A hashtable that contains for every name of the properties of the objects contained in the array the relative offset of this property (from 0 to n-1).
Constructor Detail

Create a new array (or empty array) from the given data and object type. The object type is just the array containing all property names.

new ovi.mapsapi.util.Strip(names, [data])
Parameters:
{String[]} names
{Object[]} [data]: []
Method Detail
static stencil (template, [data])
Creates a new Strip by reusing the meta data of an existing Strip and an optional data array.
Examples:
		strip1 = new Strip(["foo", "bar"], foobar1);
		strip2 = Strip.stencil(strip1, foobar2);
Parameters:
{ovi.mapsapi.util.Strip} template
{Object[]} [data]: []
Field Detail
static ovi.mapsapi.util.Strip LAT_LNG
A template for ["latitude", "longitude"] strips.
A template for ["x", "y"] strips.
Object[] data
The values of the array. To get the amount of objects contained in the array the length of this data array must be divided by the length of the names property, so: size = arr.data.length / arr.names.length;
String[] names
An array that contains the names of the properties of the objects contained in the array.
Object offsets
A hashtable that contains for every name of the properties of the objects contained in the array the relative offset of this property (from 0 to n-1).
Documentation generated on Fri Aug 19 2011 13:36:13 GMT+0200 (CEST).