Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex 如何确定FXG文件中单击的路径元素_Apache Flex_Fxg - Fatal编程技术网

Apache flex 如何确定FXG文件中单击的路径元素

Apache flex 如何确定FXG文件中单击的路径元素,apache-flex,fxg,Apache Flex,Fxg,我正在使用Flex4/fxg开发一个示例地图应用程序?现在我已经将FXG路径保存在id为的组元素中(我已经将路径的id分配给了相应的组容器)?但是,当我单击映射中的任何位置时,我不会在事件处理程序中将单击的组作为target/currentTarget。 如何确定单击了哪个元素 代码示例: <Graphic xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns="library://ns.adobe.com/flex/spark"

我正在使用Flex4/fxg开发一个示例地图应用程序?现在我已经将FXG路径保存在id为的组元素中(我已经将路径的id分配给了相应的组容器)?但是,当我单击映射中的任何位置时,我不会在事件处理程序中将单击的组作为target/currentTarget。 如何确定单击了哪个元素

代码示例:

<Graphic xmlns:fx="http://ns.adobe.com/mxml/2009" 
         xmlns="library://ns.adobe.com/flex/spark" 
         xmlns:mx="library://ns.adobe.com/flex/mx" 
         xmlns:view="view.*"
         version="2.0" viewWidth="1425" viewHeight="1140">
----
----

            <view:GraphicItem id="CityofLondon">
                <Path data="path data" winding="evenOdd">
                    <fill>
                        <SolidColor color="#FEFEE9" alpha="1"/>
                    </fill>
                    <stroke>
                        <SolidColorStroke color="#646464" alpha="1" weight="2" miterLimit="10" joints="round" caps="round"/>
                    </stroke>
                </Path>
            </view:GraphicItem>
            <view:GraphicItem id="BarkingandDagenham">
                <Path data="path data" winding="evenOdd">
                    <fill>
                        <SolidColor color="#FEFEE9" alpha="1"/>
                    </fill>
                    <stroke>
                        <SolidColorStroke color="#646464" alpha="1" weight="2" miterLimit="10" joints="round" caps="round"/>
                    </stroke>
                </Path>
            </view:GraphicItem>
----
------
</Graphic>

----
----
----
------
GraphicItem是组容器


任何帮助都将不胜感激。谢谢。

我问了一个类似的问题,答案如下:


必须将mouseEnabledWhereTransparent=“false”设置为组,并将FXG路径添加到该组。

仍在等待响应。。有人吗?你有没有得到答案?嘿,我自己也在做一个地图应用程序,但最后还是用了。请问你在做什么工作。。。我对那种东西很感兴趣