new TextFeature(id, point, text, style)
Parameters:
| Name | Type | Description | 
|---|---|---|
id | 
            
            String | A unique identifier for the text feature  | 
        
point | 
            
            OM.geometry.Point | the text feature position.  | 
        
text | 
            
            String | the text value  | 
        
style | 
            
            OM.style.Text | the text style  | 
        
Returns:
An instance of OM.TextFeature
- Type
 - OM.TextFeature
 
Extends
Members
- 
    
clipMap
 - 
    
    
A map of rectangle geometries in data coordinates to be used in clipping feature geometry elements.
Clip area is defined by tile (zoom, x index, and y index)- Inherited From:
 
 - 
    
tiledFeature
 - 
    
    
Ideintifies if feature geometries are part of a vector tile layer.
- Inherited From:
 
 - 
    
tileGeometries
 - 
    
    
For vector tile layers: the feature geometry is defined by tile (zoom, x index, and y index)
Each tile stores the feature geometry elements.- Inherited From:
 
 - 
    
tooltipCache
 - 
    
    
Cached tooltip definition
- Inherited From:
 
 - 
    
zoomLevelsGeomClipArea
 - 
    
    
The clip area for each element of vector tile layer feature by zoom level.
A feature geometry in vector tile is build as a geometry collection, with each element
being part of a different tile.
This is used when rendering the full feature geometry which can have pieces in different tiles.- Inherited From:
 
 - 
    
zoomLevelsGeometries
 - 
    
    
Store the feature geometry for a scpecifi level.
For tiled features, a geometry collection can have parts from different tiles.- Inherited From:
 
 
Methods
- 
    
animateToNewLocation(newLocation, options)
 - 
    
    
Move the FOI to a new location using an animation
Parameters:
Name Type Description newLocationOM.geometry.Geometry a point or polyline geometry that specifies
the path along which the FOI moves. If it is a point geometry, the FOI will
move along the straight line from its current location to the new location.
If it is a polyline geometry, the FOI will move along the path defined by the polyline.optionsObject This can have the following attributes:
- time {int} I milliseconds. It affects the feature moving speed. The default value is 300. A larger
value results in a slower movement. - loop {Boolean} If true, restart the animation from the origin after it is completed
 - bounce {Boolean} If true, the feature will bounce back to the origin after the initial animated motion.
 
- Inherited From:
 
 - time {int} I milliseconds. It affects the feature moving speed. The default value is 300. A larger
 - 
    
bringForward()
 - 
    
    
Brings the feature to the front by one z-index level
( i.e. closer to the top of the displayed feature layers).- Inherited From:
 
Returns:
- Type
 - void
 
 - 
    
bringToTop()
 - 
    
    
Brings the feature all the way to the top of the displayed features or layers.
(i.e. this becomes the topmost feature- Inherited From:
 
Returns:
- Type
 - void
 
 - 
    
enableMarkerDraggable(b)
 - 
    
    
set draggable status (for map markers)
Parameters:
Name Type Description bboolean true for draggable, false otherwise
- Inherited From:
 
Returns:
- Type
 - void
 
 - 
    
getAliasColumnName(column)
 - 
    
    
Gets the attribute map name for the specified data column in this feature.
Parameters:
Name Type Description columnString the name of the data column to find a map.
- Inherited From:
 
Returns:
the mapped attribute name, or null if no
map for the input column is found.- Type
 - String
 
 - 
    
getAttributes()
 - 
    
    
Returns all the attributes for this feature. You can look
up each attribute's value based on its name. Note that all
attribute names are stored in uppercase internally.- Inherited From:
 
Returns:
the attributes object e.g. {"NAME":"Super Store", "SALES":5000}
- Type
 - Object
 
 - 
    
getAttributeValue(name)
 - 
    
    
Gets the current value for the specified attribute in this feature.
Parameters:
Name Type Description nameString the name of the attribute to be returned.
- Inherited From:
 
Returns:
the value for the given attribute, or null if no
attribute with the given name was found.- Type
 - Object
 
 - 
    
getClusteredFeatures()
 - 
    
    
Returns the clustered features that are in this clustered feature, null if this feature is not a cluster feature
- Inherited From:
 
Returns:
a arrays of features. .
- Type
 - Array
 
 - 
    
getClusterFeature()
 - 
    
    
Returns the cluster feature where this primitive feature is grouped in.
- Inherited From:
 
Returns:
a cluster feature where the current feature is included;
null if this primitive feature is not in a cluster.- Type
 - OM.Feature
 
 - 
    
getClusterId()
 - 
    
    
Returns its cluster ID, if in a cluster; null otherwise
- Inherited From:
 
Returns:
a cluster ID.
- Type
 - String
 
 - 
    
getFeaturesInCluster()
 - 
    
    
For a clustered feature, all features in it will be returned.
For a normal (single) feature, null will be returned.- Inherited From:
 
Returns:
[Array] feature array or null.
 - 
    
getGeometry()
 - 
    
    
Return the feature's geometry
- Inherited From:
 
Returns:
the current feature geometry
- Type
 - OM.geometry.Geometry
 
 - 
    
getLabelingStyle()
 - 
    
    
Gets the current labeling style.
- Inherited From:
 
Returns:
The label style
- Type
 - OM.style.Style
 
 - 
    
getMarkerText()
 - 
    
    
Gets text on a Marker feature.
- Inherited From:
 
Returns:
- Type
 - String
 
 - 
    
getRealColumnName(attr)
 - 
    
    
Gets the real, original column name for the specified attribute in this feature.
Parameters:
Name Type Description attrString the attribute name
- Inherited From:
 
Returns:
the real, original column name, or null if the input attribute name
is not mapped to one.- Type
 - String
 
 - 
    
getRenderingStyle()
 - 
    
    
Get the rendering style
- Inherited From:
 
Returns:
the current rendering style for the feature
- Type
 - OM.style.Style
 
 - 
    
getText()
 - 
    
    
Gets the text value
Returns:
the text value
- Type
 - String
 
 - 
    
hasAttributes()
 - 
    
    
Check if the feature has the optional attributes object
- Inherited From:
 
Returns:
true if it does, false otherwise.
- Type
 - Boolean
 
 - 
    
isCluster()
 - 
    
    
This method checks whether this is a clustered feature.
- Inherited From:
 
Returns:
true if feature is clustered and false if not.
- Type
 - Boolean
 
 - 
    
isEditable()
 - 
    
    
This method checks whether the feature is editable or not.
- Inherited From:
 
Returns:
true if feature is editable and false if not.
- Type
 - Boolean
 
 - 
    
isInCluster()
 - 
    
    
Returns a Boolean value to indicate if the current feature is in a cluster.
- Inherited From:
 
Returns:
true if this feature in in a cluster; false otherwise.
- Type
 - Boolean
 
 - 
    
isVisible()
 - 
    
    
Checks whether the feature is currently visible.
- Inherited From:
 
Returns:
true it is visible, false if not.
- Type
 - Boolean
 
 - 
    
on()
 - 
    
    
A shorthand name for the member function addListener.
- Inherited From:
 - Mixes In:
 
 - 
    
sendBackward()
 - 
    
    
Sends the feature to the back by one z-index level
(i.e. closer to the bottom of the displayed feature layers).- Inherited From:
 
Returns:
- Type
 - void
 
 - 
    
sendToBottom()
 - 
    
    
Sends the feature all the way to the bottom of the displayed features or layers
- Inherited From:
 
Returns:
- Type
 - void
 
 - 
    
setEditRenderingStyle(style)
 - 
    
    
Sets a custom rendering style to be displayed when the TextFeature enters
editing mode.Parameters:
Name Type Description styleOM.style.Text The edition text style.
Returns:
- Type
 - void
 
 - 
    
setGeometry(point)
 - 
    
    
Sets a point/oriented point for the text feature. The new geometry should be of the same type
as the existing one, otherwise this call does nothing and returns false.Parameters:
Name Type Description pointOM.geometry.Point the new point location
- Overrides:
 
 - 
    
setInfoWindowContent(html)
 - 
    
    
Sets the info window (html) content
Parameters:
Name Type Description htmlString the info window content.
- Inherited From:
 
Returns:
- Type
 - void
 
 - 
    
setLabel(label)
 - 
    
    
Sets the label text on the feature.
Parameters:
Name Type Description labelString The label text to be set.
- Inherited From:
 
Returns:
- Type
 - void
 
 - 
    
setLabelingStyle(style)
 - 
    
    
Sets the labeling style to be used when rendering label text.
Parameters:
Name Type Description styleOM.style.Style The style used for label text
- Inherited From:
 
Returns:
- Type
 - void
 
 - 
    
setMarkerText(text)
 - 
    
    
Sets text on Marker feature.
Parameters:
Name Type Description textString the text string to add on a marker.
- Inherited From:
 
Returns:
- Type
 - void
 
 - 
    
setRenderingStyle(style)
 - 
    
    
Sets text style.
Parameters:
Name Type Description styleOM.style.Text The text style
- Overrides:
 
Returns:
- Type
 - void
 
 - 
    
setText(text)
 - 
    
    
Sets a text value for the text feature.
Parameters:
Name Type Description textString the new text content
Returns:
- Type
 - void
 
 - 
    
setVisible(visible)
 - 
    
    
Sets the visibility of the feature.
Parameters:
Name Type Description visibleBoolean - Inherited From:
 
Returns:
- Type
 - void