我使用 Flash Builder 4.6 和 openscales 2.2 构建了一个移动应用程序
我使用了openscales 1.2.1,它工作得很好,但是速度很慢,缩放效果也不好。
所以我想升级到openscales 2.2。我将 .swc 添加到我的 libs 文件夹中,并将 FeatureLayer 更改为 VectorLayer,因为它在新版本中已重命名。
如果我测试应用程序,调试器会给我以下错误:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at org.openscales.core::Map()[D:\workspace\openscales\target\checkout\openscales-core\src\main\flex\org\openscales\core\Map.as:296]
at org.openscales.fx::FxMap()[D:\workspace\openscales\target\checkout\openscales-fx\src\main\flex\org\openscales\fx\FxMap.as:70]
at views::mapView/_mapView_FxMap1_i()
at views::mapView/_mapView_Array1_c()
at mx.core::DeferredInstanceFromFunction/getInstance()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\DeferredInstanceFromFunction.as:108]
at spark.components::SkinnableContainer/createDeferredContent()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\SkinnableContainer.as:1049]
at spark.components::SkinnableContainer/createContentIfNeeded()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\SkinnableContainer.as:1078]
at spark.components::SkinnableContainer/createChildren()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\SkinnableContainer.as:885]
at mx.core::UIComponent/initialize()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:7634]
at spark.components::View/initialize()[E:\dev\4.y\frameworks\projects\mobilecomponents\src\spark\components\View.as:999]
at views::mapView/initialize()
at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:7495]
at mx.core::UIComponent/addChildAt()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:7199]
at spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Group.as:2037]
at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Group.as:1628]
at spark.components::Group/addElementAt()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Group.as:1387]
at spark.components::Group/addElement()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Group.as:1345]
at spark.components::SkinnableContainer/addElement()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\SkinnableContainer.as:761]
at spark.components::ViewNavigator/createViewInstance()[E:\dev\4.y\frameworks\projects\mobilecomponents\src\spark\components\ViewNavigator.as:2018]
at spark.components::ViewNavigator/commitNavigatorAction()[E:\dev\4.y\frameworks\projects\mobilecomponents\src\spark\components\ViewNavigator.as:1932]
at spark.components::ViewNavigator/commitProperties()[E:\dev\4.y\frameworks\projects\mobilecomponents\src\spark\components\ViewNavigator.as:1301]
at mx.core::UIComponent/validateProperties()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:8219]
at mx.managers::LayoutManager/validateProperties()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:597]
at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:813]
at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\LayoutManager.as:1180]
D:\workspace\openscales\target\checkout\openscales-core\src\main\flex\org\openscales\core\Map.as:296] 这行真的很奇怪,因为我的电脑上没有这个文件夹正因为如此,我认为 openscales 的 .swc 中存在错误的路径?
最好的问候珍妮