public class Feature extends JavascriptObject implements Serializable
counter, JS_GLOBAL, objectIds| Constructor and Description |
|---|
Feature(Point geometry,
String name)
Creates a new feature.
|
Feature(Point geometry,
String name,
Style style)
Creates a new feature.
|
| Modifier and Type | Method and Description |
|---|---|
Feature |
geometry(Point geometry)
Sets the geometry of the feature.
|
Point |
getGeometry()
Returns the geometry of this feature.
|
String |
getJsType()
Returns a String with the type of Javascript object that this object represents.
|
String |
getName()
Returns the name of the feature.
|
Number |
getNumber(String key)
Returns the value of this feature's attribute or null if it is not present.
|
String |
getString(String key)
Returns the value of this feature's attribute or null if it is not present.
|
Style |
getStyle()
Returns the style used to render this feature.
|
Feature |
name(String name)
Sets the name of this feature.
|
Feature |
putNumber(String key,
Number value)
Adds an attribute to this feature.
|
Feature |
putString(String key,
String value)
Adds an attribute to this feature.
|
String |
renderAfterConstructorJs() |
String |
renderJs()
Returns a String with containing the rendered Javascript code for this object.
|
void |
setGeometry(Point geometry)
Sets the geometry of the feature.
|
void |
setName(String name)
Sets the name of this feature.
|
void |
setStyle(Style style)
Sets the style used to render this feature.
|
Feature |
style(Style style)
Sets the style used to render this feature.
|
escapeQuoteJs, getJsId, getJsIdWithSuffixpublic Feature(Point geometry, String name)
geometry - The geometry of the featurename - The name for this featurepublic Point getGeometry()
public void setGeometry(Point geometry)
geometry - New valuepublic Feature geometry(Point geometry)
geometry - New valuepublic String getName()
public void setName(String name)
name - New valuepublic Feature name(String name)
name - New valuepublic Style getStyle()
public void setStyle(Style style)
style - New valuepublic Feature style(Style style)
style - New valuepublic Feature putString(String key, String value)
key - Name of the attributevalue - String with the value of the attributepublic String getString(String key)
key - Name of the attributepublic Feature putNumber(String key, Number value)
key - Name of the attributevalue - Number with the value of the attributepublic Number getNumber(String key)
key - Name of the attributepublic String getJsType()
JavascriptObjectgetJsType in interface IJavascriptObjectgetJsType in class JavascriptObjectpublic String renderAfterConstructorJs()
public String renderJs()
JavascriptObjectrenderJs in interface IJavascriptObjectrenderJs in class JavascriptObjectCopyright © 2015. All rights reserved.