import mx.core.*;
import mx.managers.PopUpManager;
import flash.geom.Point;
+ import flash.net.*;
private var mapFeatures:MapFeatures;
private var selectedEntity:Entity;
var txt:String = feature.htmlDetails(entity);
iconText.htmlText = txt;
popupChange.label = feature.name;
+ setLimitTypes(entity);
tw.setSelectedFeature(feature);
+ helpLabel.visible = feature.hasHelpURL();
+ }
+
+ private function setLimitTypes(entity:Entity):void {
+ var type:String = null;
+ if ( entity is Node )
+ type = "point";
+ else if ( entity is Way )
+ type = Way(entity).isArea() ? "area" : "line";
+ else if ( entity is Relation )
+ type = "relation";
+ tw.setLimitTypes(type);
}
private function blankFeatureIcon(entity:Entity):void {
"<i>Nothing selected</i>" :
"<b>Not recognised</b><br/>Try looking at the tags under the advanced properties";
popupChange.label = "unknown";
+ setLimitTypes(entity);
tw.setSelectedFeature(null);
+ helpLabel.visible = false;
}
private function initialiseEditors():void {
public function openDescription():void {
trace("open description here");
+ if ( feature != null && feature.hasHelpURL() )
+ navigateToURL(new URLRequest(feature.helpURL), "potlatch_help");
}
public function addNewTag():void {