5. Other Objects and Methods

5.1. GSHashtable Methods

ConstructorGSHashtable()
DescriptionCreates a new GSHashtable object.
Example
var gshash = new GSHashtable();
Methodput(String key,Object value)
DescriptionStores a key / value pair in the GSHashtable.
Example
gshash.put("city","Zürich");
MethodObject get(String key)
DescriptionDelivers the value identified by key. If the key does not exist, get() returns null.
Example
var city = gshash.get("city");
if (city == null) {
   // there is no key "city"
}
MethodArray keys()
DescriptionDelivers all keys of the GSHashtable as an Array.
Example
for (k in gshash.keys()) {
   // process values
   value = ghash.get(k);
}

5.2. GSPolygon Methods

ConstructorGSPolygon()
DescriptionCreates a new GSPolygon object.
Example
var gspolygon = new GSPolygon();
Methodadd(GSPoint p)
DescriptionAdds a GSPoint to the polygon.
Example
gspolygon.add(new GSPoint(600000.000,200000.000));

5.3. Utility Methods

ConstructorGSBrowserCheck()
DescriptionTests if the browser is compatible with the GSAPI.
Example
if (!GSBrowserCheck()) {
   return;
}