forked from 3ign0n/TiOpenStreetMap
-
Notifications
You must be signed in to change notification settings - Fork 0
wetfire2k/TiOpenStreetMap
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
=INTRODUCTION I compare the following Open Street Map implementation - OsmAnd http://osmand.net/ - Big Plannet Tracks http://code.google.com/p/big-planet-tracks/ - MapDroid http://tedp.id.au/mapdroid/ - RMaps2 http://code.google.com/p/robertprojects/ I think RMaps2 is one of the most active project, simple design and small footprint. So I choose it as a base project to realize a offline map feature. =Building RMaps2 base Android module for Titanium - first of all, generate android resource, R class. (Titanium doesn't support it at this time, so I wrote ant target in build.custom.xml) > ant rsc-gen - type ant. - copy android resource files under res folder using ant target copy-rsc > ant copy-rsc NOTE: Titanium mobile module building system also doesn't support Android aidl, but I wrote pre.compile hook(1.6.x series doesn't have this hook, use 1.7.x) (see /Library/Application Support/Titanium/mobilesdk/osx/1.7.0/module/android/build.xml) = Building example Titanium app using RMaps2 based Android module - copy org.appcelerator.openstreetmap-android-0.1.zip into example/TiUIOpenStreetMapExample - build TiUIOpenStreetMapExample project using Titanium Developer/Titanium Studio =PROBLEMS: - post.jar, hook doesn't. I don't know why. - properties, manifest.moduleid and manifest.version are blank in build.custom.xml even though there is a line <property file="${ti.module.root}/manifest" prefix="manifest"/> so I gave tricky lines in build.properties, those properties will be set manually in it. - RMap2 based Android module has these errors: 04-18 00:00:34.056: ERROR/AndroidRuntime(994): FATAL EXCEPTION: main 04-18 00:00:34.056: ERROR/AndroidRuntime(994): java.lang.NullPointerException 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at org.andnav.osm.views.OpenStreetMapView.onDraw(OpenStreetMapView.java:640) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.View.draw(View.java:6740) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.drawChild(ViewGroup.java:1640) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.drawChild(ViewGroup.java:1638) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.drawChild(ViewGroup.java:1638) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.drawChild(ViewGroup.java:1638) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.drawChild(ViewGroup.java:1638) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.drawChild(ViewGroup.java:1638) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.drawChild(ViewGroup.java:1638) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.drawChild(ViewGroup.java:1638) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.View.draw(View.java:6743) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.widget.FrameLayout.draw(FrameLayout.java:352) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.drawChild(ViewGroup.java:1640) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.View.draw(View.java:6743) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.widget.FrameLayout.draw(FrameLayout.java:352) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.drawChild(ViewGroup.java:1640) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1367) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.View.draw(View.java:6743) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.widget.FrameLayout.draw(FrameLayout.java:352) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1842) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewRoot.draw(ViewRoot.java:1407) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewRoot.performTraversals(ViewRoot.java:1163) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.view.ViewRoot.handleMessage(ViewRoot.java:1727) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.os.Handler.dispatchMessage(Handler.java:99) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.os.Looper.loop(Looper.java:123) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at android.app.ActivityThread.main(ActivityThread.java:4627) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at java.lang.reflect.Method.invokeNative(Native Method) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at java.lang.reflect.Method.invoke(Method.java:521) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 04-18 00:00:34.056: ERROR/AndroidRuntime(994): at dalvik.system.NativeStart.main(Native Method) 04-18 00:00:34.586: WARN/ActivityManager(106): Force finishing activity org.appcelerator.openstreetmap.example/ti.modules.titanium.ui.TiTabActivity 04-18 00:00:34.626: WARN/ActivityManager(106): Force finishing activity org.appcelerator.openstreetmap.example/.TiuiopenstreetmapexampleActivity 04-18 00:00:35.126: WARN/ActivityManager(106): Activity pause timeout for HistoryRecord{43e971f0 org.appcelerator.openstreetmap.example/ti.modules.titanium.ui.TiTabActivity} 04-18 00:00:37.996: ERROR/RMAPS(994): Error Downloading MapTile. Exception: MalformedURLException 04-18 00:00:37.996: ERROR/RMAPS(994): java.net.MalformedURLException: Protocol not found: hl=en&x=0&y=0&zoom=17&s= 04-18 00:00:37.996: ERROR/RMAPS(994): at java.net.URL.<init>(URL.java:275) 04-18 00:00:37.996: ERROR/RMAPS(994): at java.net.URL.<init>(URL.java:159) 04-18 00:00:37.996: ERROR/RMAPS(994): at org.andnav.osm.views.util.OpenStreetMapTileDownloader$1.run(OpenStreetMapTileDownloader.java:102) 04-18 00:00:37.996: ERROR/RMAPS(994): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068) 04-18 00:00:37.996: ERROR/RMAPS(994): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561) 04-18 00:00:37.996: ERROR/RMAPS(994): at java.lang.Thread.run(Thread.java:1096) 04-18 00:00:38.237: INFO/TiAnalyticsSvc(994): (Thread-11) [7333,12579] Sending 2 analytics events. =TODO - current version's RMaps2 is not support Android 1.6 - add public methods and properties same as Titanium.Map.MapView https://developer.appcelerator.com/apidoc/mobile/1.6.1/Titanium.Map.MapView-object
About
example to use Titanium Android OSM module
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published