Thursday, August 30, 2012

Upgrading from ArcGIS Android API v1.1 to v2.0

If you got a ArcGIS Android Project using ArcGIS API v1.1 and switch to v2.0, you will have a runtime exception when you do a pan action in the map view.

   FATAL EXCEPTION: main
   java.lang.UnsatisfiedLinkError: nativeSetAnimating
   com.esri.android.map.MapSurface.nativeSetAnimating(Native Method)
   ...

To solve this problem, you need to:
  1. Create a new ArcGIS Android project using v2.0
  2. Copy the files "libs/armeabi/libGLMapCore.so" and "libs/armeabi-v7a/libGLMapCore.so" back to your original v1.0 project directory
Very stupid right? But choose to use this product is stupid enough.


Tuesday, August 28, 2012

DOJO: Tab ordering in TabContainer

The tabContainer.getChildren( ) method returns a list of tab widget (ContentPane) in the container using the following way:

    dijit.findWidgets(tabContainer.containerNode)

However, if you did some drag and drop actions on the tab button list to rearrange the tab ordering, the tab sequence did not changed actually. To get a modified / correct ordered list, you may try to override the getChildren( ) method:

    myTabContainer.getChildren = function() {
        var list = this.tablist.getChildren();
        var rsltList = [];
        for (var idx=0; idx<list.length; idx++) {
           rsltList.push(list[idx].tab);
        }
        return rsltList;
    }

Noticed the underlined "tab" member variable in the code, you need to manually assign it when your tab page is created. Or you may find a way / method to get the Tab page object (ContentPane) via the Tab Button.

If you got any better method, please let me know :-)

Thursday, August 23, 2012

Sync multiple git repo at once

Use the following command in Linux will do the job:  ls -d RepoNames* | xargs -I{} git -C {} pull