Package | net.systemeD.potlatch2.mapfeatures |
Class | public class Feature |
Inheritance | Feature flash.events.EventDispatcher |
Property | Defined by | ||
---|---|---|---|
definition : XML [read-only] The XML subtree that this feature was loaded from.
| Feature | ||
description : String [read-only] The human-readable description of the feature, or null if none.
| Feature | ||
dndimage : ByteArray [read-only] Returns the drag+drop override-icon defined for the feature.
| Feature | ||
editors : Array [read-only] List of editing controls associated with this feature.
| Feature | ||
helpURL : String [read-only] The defined help string, if any.
| Feature | ||
image : ByteArray [read-only] Returns the icon defined for the feature.
| Feature | ||
missingIconCls : Class | Feature | ||
name : String [read-only] The human-readable name of the feature (
| Feature | ||
tags : Array [read-only] List of {k, v} pairs that define the feature.
| Feature | ||
withins : Array [read-only] List of "withins" which further restrict the applicability of the feature.
| Feature |
Method | Defined by | ||
---|---|---|---|
Feature(mapFeatures:MapFeatures, _xml:XML)
Create this Feature from an XML subtree.
| Feature | ||
canDND():Boolean
Can this feature be drag-and-dropped from the side panel? By default, any "point" feature can,
unless it has
| Feature | ||
The first category that the feature belongs to, as defined by the order of the map features XML file.
| Feature | ||
hasHelpURL():Boolean
Whether there is a help string defined or one can be derived from tags.
| Feature | ||
htmlDetails(entity:Entity):String
| Feature | ||
htmlEscape(str:String):String
[static] Basic HTML escaping.
| Feature | ||
isInCategory(category:String):Boolean
Whether this feature belongs to the given category or not, as defined by its definition in the XML file.
| Feature | ||
isType(type:String):Boolean
Whether the feature is of the given type (point, line/area, relation).
| Feature | ||
makeHTMLIcon(icon:XMLList, entity:Entity):String
[static] Convert the contents of the "icon" tag as an HTML string, with variable substitution.
| Feature |
definition | property |
definition:XML
[read-only]The XML subtree that this feature was loaded from.
Implementation public function get definition():XML
description | property |
description:String
[read-only]The human-readable description of the feature, or null if none.
This property can be used as the source for data binding.
Implementation public function get description():String
dndimage | property |
dndimage:ByteArray
[read-only]Returns the drag+drop override-icon defined for the feature. This uses the "dnd" property of the feature's icon element, or if there is no override-icon it falls back to the standard image.
This property can be used as the source for data binding.
Implementation public function get dndimage():ByteArray
editors | property |
editors:Array
[read-only]List of editing controls associated with this feature.
Implementation public function get editors():Array
helpURL | property |
helpURL:String
[read-only]The defined help string, if any. If none, generate one from tags on the feature, pointing to the OSM wiki.
Implementation public function get helpURL():String
image | property |
image:ByteArray
[read-only]Returns the icon defined for the feature. This uses the "image" property of the feature's icon element. If no image property is defined, returns a default "missing icon".
This property can be used as the source for data binding.
Implementation public function get image():ByteArray
missingIconCls | property |
public var missingIconCls:Class
This property can be used as the source for data binding.
name | property |
name:String
[read-only]The human-readable name of the feature (
This property can be used as the source for data binding.
Implementation public function get name():String
tags | property |
tags:Array
[read-only]List of {k, v} pairs that define the feature.
Implementation public function get tags():Array
withins | property |
withins:Array
[read-only]List of "withins" which further restrict the applicability of the feature. Each within is a {entity, k, ?v, ?minimum, ?role} object.
Implementation public function get withins():Array
Feature | () | constructor |
public function Feature(mapFeatures:MapFeatures, _xml:XML)
Create this Feature from an XML subtree.
ParametersmapFeatures:MapFeatures |
|
_xml:XML |
canDND | () | method |
public function canDND():Boolean
Can this feature be drag-and-dropped from the side panel? By default, any "point" feature can,
unless it has
Boolean |
findFirstCategory | () | method |
public function findFirstCategory():Category
The first category that the feature belongs to, as defined by the order of the map features XML file.
ReturnsCategory |
hasHelpURL | () | method |
public function hasHelpURL():Boolean
Whether there is a help string defined or one can be derived from tags.
ReturnsBoolean |
htmlDetails | () | method |
htmlEscape | () | method |
public static function htmlEscape(str:String):String
Basic HTML escaping.
Parametersstr:String |
String |
isInCategory | () | method |
public function isInCategory(category:String):Boolean
Whether this feature belongs to the given category or not, as defined by its definition in the XML file.
Parameterscategory:String |
Boolean |
isType | () | method |
public function isType(type:String):Boolean
Whether the feature is of the given type (point, line/area, relation).
Parameterstype:String |
Boolean |
makeHTMLIcon | () | method |
public static function makeHTMLIcon(icon:XMLList, entity:Entity):String
Convert the contents of the "icon" tag as an HTML string, with variable substitution.
Parametersicon:XMLList |
|
entity:Entity |
String |