import nl.idgis.giclient.modes.MapViewerAction; import nl.idgis.giclient.gui.mapviewer.MapViewer; import nl.idgis.giclient.geoma.Point; import nl.idgis.giclient.gis.SelectableLayer; import nl.idgis.giclient.webserviceconnector.wfsconnector.WFSConnector; import nl.idgis.giclient.webserviceconnector.wfsconnector.FeatureType; /** * @author copierrj */ class nl.idgis.giclient.modes.MapViewerGML implements MapViewerAction { function enter(mapViewer : MapViewer) : Void { } function exit(mapViewer : MapViewer) : Void { } function performPress(mapViewer : MapViewer, pressX : Number, pressY : Number, worldPoint : Point) : Void { var mapFeatures:Array = mapViewer.getMapFeaturesUnderMousePointer(MapViewer.FRONTMOST_LAYER, false, false); var layer:SelectableLayer = SelectableLayer(mapFeatures[0]._parent._parent.getLayer()); var featureID:String = mapViewer.getFeatureID(mapFeatures[0]._name); if(layer != null) { var wfsUrl:String = WFSConnector(layer.getWfsConnector()).getURL(); var featureType:FeatureType = layer.getFeatureType(); if(featureType != null) { var requestUrl:String = wfsUrl + "request=GetFeature&service=WFS&version=1.1.0&typeName=" + featureType.getTargetNamespacePrefix() + ":" + featureType.getName() + "&namespaces=xmlns(" + featureType.getTargetNamespacePrefix() + "=" + featureType.getTargetNamespace() + ")" + "&featureID=" + featureID; getURL(requestUrl, "_blank"); } } } function performRelease(mapViewer : MapViewer) : Void { } function performMouseUp(mapViewer : MapViewer) : Void { } function performMouseMove(mapViewer : MapViewer) : Void { } function performDrag(mapViewer : MapViewer) : Void { } function onKeyPress(mapViewer : MapViewer) : Void { } }