Package | net.systemeD.potlatch2.mapfeatures |
Class | public class MapFeatures |
Inheritance | MapFeatures flash.events.EventDispatcher |
There are four "types" of features: point, line, area, relation. However, the autocomplete functions refer to these as node, way (line/area) and relation.
Property | Defined by | ||
---|---|---|---|
categories : Array [read-only] Array of every Category found in the map features file.
| MapFeatures | ||
definition : XML [read-only] The loaded source XML file itself.
| MapFeatures | ||
features : Array [read-only] All features.
| MapFeatures | ||
pois : Array [read-only] All Features of type "point".
| MapFeatures |
Method | Defined by | ||
---|---|---|---|
Find the first Feature (template) that matches the given Entity (actual existing object in the map).
| MapFeatures | ||
getAutoCompleteKeys(type:String):Array
A list of all Keys for all features of the given type, sorted.
| MapFeatures | ||
getAutoCompleteValues(type:String, key:String):Array
Get all the possible values that could go with a given key and type.
| MapFeatures | ||
getCategoriesForType(type:String):Array
Categories that contain at least one Feature corresponding to a certain type, such as "area" or "point".
| MapFeatures | ||
[static] Instantiates MapFeatures by loading it if required.
| MapFeatures | ||
hasLoaded():Boolean
Indicates whether the XML file has finished being loaded.
| MapFeatures |
Method | Defined by | ||
---|---|---|---|
loadFeatures():void
Loads list of map features from XML file which it first retrieves.
| MapFeatures |
categories | property |
categories:Array
[read-only]Array of every Category found in the map features file.
This property can be used as the source for data binding.
Implementation public function get categories():Array
definition | property |
definition:XML
[read-only]The loaded source XML file itself.
Implementation public function get definition():XML
features | property |
features:Array
[read-only]All features.
This property can be used as the source for data binding.
Implementation public function get features():Array
pois | property |
pois:Array
[read-only]All Features of type "point".
This property can be used as the source for data binding.
Implementation public function get pois():Array
findMatchingFeature | () | method |
public function findMatchingFeature(entity:Entity):Feature
Find the first Feature (template) that matches the given Entity (actual existing object in the map). This is done to provide appropriate editing controls that correspond to the selected Entity.
Parametersentity:Entity — The Entity to try and match against.
|
Feature —
The first suitable Feature, or null.
|
getAutoCompleteKeys | () | method |
public function getAutoCompleteKeys(type:String):Array
A list of all Keys for all features of the given type, sorted.
Parameterstype:String |
Array |
getAutoCompleteKeys ("way")
getAutoCompleteValues | () | method |
public function getAutoCompleteValues(type:String, key:String):Array
Get all the possible values that could go with a given key and type. TODO: Include values previously entered by the user, but not existent in XML file.
Parameterstype:String |
|
key:String |
Array |
getAutoCompleteValues("way", "highway")
getCategoriesForType | () | method |
public function getCategoriesForType(type:String):Array
Categories that contain at least one Feature corresponding to a certain type, such as "area" or "point".
Parameterstype:String |
Array — Filtered Array of Category objects, possibly empty. null if XML file is not yet processed.
|
getInstance | () | method |
public static function getInstance():MapFeatures
Instantiates MapFeatures by loading it if required.
ReturnsMapFeatures |
hasLoaded | () | method |
public function hasLoaded():Boolean
Indicates whether the XML file has finished being loaded.
ReturnsBoolean |
loadFeatures | () | method |
protected function loadFeatures():void
Loads list of map features from XML file which it first retrieves.