首页 / 浏览问题 / 移动GIS / 问题详情
10i Lite 如何加载MVT地图瓦片
2EXP 2019年08月07日

在帮助文档里看到说有

  • 支持MVT及GL地图瓦片在线加载

但是没有找到相应的接口或者示例代码,问一下如何实现10i iMobile Lite 加载MVT地图瓦片

1个回答

您好,新版本刚刚发布,示范代码还没有发出来。我这边先测试一下,测试结果稍后回复你
9,197EXP 2019年08月08日

检查一下依赖有没有加成功,这种错误是Android环境的问题,网上有很多解决方案的,建议可以先百度。可以参考这篇博客https://blog.csdn.net/qq_35928566/article/details/85762677

能否把写的示例代码发一份到我邮箱里,供参考一下呀?
snake8859@qq.com
您好,示范代码在上面我已经贴出来了。对于库找不到你得看一下你的库是否都依赖了,解决方案的博客上面我也已经贴出来了

这是我换eclipse开发平台下,使用真机调试的情况,这是打开app,在logcat里的部分日志信息,地图还是没加载出来,请问这个日志里面有反应什么问题嘛?

08-09 11:29:55.742: I/dalvikvm(12591): Could not find method javax.servlet.ServletContext.getRealPath, referenced from method com.supermap.services.util.Tool.getRealPathFromServletContext
08-09 11:29:55.742: W/dalvikvm(12591): VFY: unable to resolve interface method 23514: Ljavax/servlet/ServletContext;.getRealPath (Ljava/lang/String;)Ljava/lang/String;
08-09 11:29:55.742: D/dalvikvm(12591): VFY: replacing opcode 0x72 at 0x0002
08-09 11:29:55.757: W/dalvikvm(12591): dvmFindClassByName rejecting 'resource/rest_zh_CN'
08-09 11:29:55.757: W/dalvikvm(12591): dvmFindClassByName rejecting 'resource/rest_zh'
08-09 11:29:55.757: W/dalvikvm(12591): dvmFindClassByName rejecting 'resource/rest'
08-09 11:29:55.757: W/System.err(12591): bundle:resource/rest is null
08-09 11:29:55.773: E/dalvikvm(12591): Could not find class 'java.awt.image.BufferedImage', referenced from method com.supermap.services.rest.util.FastJsonUtils$BufferedImageDecorderResolver.canDecoder
08-09 11:29:55.773: W/dalvikvm(12591): VFY: unable to resolve const-class 3000 (Ljava/awt/image/BufferedImage;) in Lcom/supermap/services/rest/util/FastJsonUtils$BufferedImageDecorderResolver;
08-09 11:29:55.773: D/dalvikvm(12591): VFY: replacing opcode 0x1c at 0x0000
08-09 11:29:55.781: W/BitmapDrawable(12591): BitmapDrawable cannot decode null
08-09 11:29:55.781: I/MapView(12591): dm.density:1.5
08-09 11:29:55.804: D/dalvikvm(12591): GC_CONCURRENT freed 291K, 12% free 7937K/9000K, paused 3ms+2ms, total 29ms
08-09 11:29:55.804: D/dalvikvm(12591): WAIT_FOR_CONCURRENT_GC blocked 18ms
08-09 11:29:55.804: I/dalvikvm-heap(12591): Grow heap (frag case) to 9.889MB for 1463056-byte allocation
08-09 11:29:55.828: D/dalvikvm(12591): GC_FOR_ALLOC freed 1K, 11% free 9364K/10432K, paused 24ms, total 24ms
08-09 11:29:55.835: I/MapView(12591): icon_scale.9.png is not existent
08-09 11:29:55.835: D/dalvikvm(12591): Trying to load lib /data/app-lib/com.sample.mvtsample-2/liblite.so 0x41527ac0
08-09 11:29:55.859: D/dalvikvm(12591): GC_CONCURRENT freed 2K, 11% free 9369K/10432K, paused 2ms+2ms, total 28ms
08-09 11:29:55.937: D/dalvikvm(12591): Added shared lib /data/app-lib/com.sample.mvtsample-2/liblite.so 0x41527ac0
08-09 11:29:55.960: W/System.err(12591): java.io.FileNotFoundException: icu/icudt50l.dat
08-09 11:29:55.968: W/System.err(12591): 	at android.content.res.AssetManager.openAsset(Native Method)
08-09 11:29:55.968: W/System.err(12591): 	at android.content.res.AssetManager.open(AssetManager.java:315)
08-09 11:29:55.968: W/System.err(12591): 	at android.content.res.AssetManager.open(AssetManager.java:289)
08-09 11:29:55.968: W/System.err(12591): 	at com.supermap.imobilelite.maps.FileUtil.upLoadConfigFile(FileUtil.java:19)
08-09 11:29:55.968: W/System.err(12591): 	at com.supermap.imobilelite.maps.RMGLCanvas.CheckFile(RMGLCanvas.java:62)
08-09 11:29:55.968: W/System.err(12591): 	at com.sample.mvtsample.MainActivity.onCreate(MainActivity.java:29)
08-09 11:29:55.968: W/System.err(12591): 	at android.app.Activity.performCreate(Activity.java:5255)
08-09 11:29:55.968: W/System.err(12591): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
08-09 11:29:55.968: W/System.err(12591): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2213)
08-09 11:29:55.968: W/System.err(12591): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299)
08-09 11:29:55.968: W/System.err(12591): 	at android.app.ActivityThread.access$700(ActivityThread.java:154)
08-09 11:29:55.968: W/System.err(12591): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
08-09 11:29:55.968: W/System.err(12591): 	at android.os.Handler.dispatchMessage(Handler.java:99)
08-09 11:29:55.968: W/System.err(12591): 	at android.os.Looper.loop(Looper.java:137)
08-09 11:29:55.968: W/System.err(12591): 	at android.app.ActivityThread.main(ActivityThread.java:5308)
08-09 11:29:55.968: W/System.err(12591): 	at java.lang.reflect.Method.invokeNative(Native Method)
08-09 11:29:55.968: W/System.err(12591): 	at java.lang.reflect.Method.invoke(Method.java:511)
08-09 11:29:55.968: W/System.err(12591): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
08-09 11:29:55.968: W/System.err(12591): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
08-09 11:29:55.968: W/System.err(12591): 	at dalvik.system.NativeStart.main(Native Method)
08-09 11:29:55.976: I/wnmng(12591): ~~~~~ICU~~INIT~~~~/data/data/com.sample.mvtsample/files/icu
08-09 11:29:55.976: I/wnmng(12591): _____________________activity_________________-Oncreate______________________
08-09 11:29:55.976: I/System.out(12591): /storage/emulated/0/SuperMap/WebCahe
08-09 11:29:56.125: D/libEGL(12591): loaded /system/lib/egl/libEGL_MRVL.so
08-09 11:29:56.148: D/libEGL(12591): loaded /system/lib/egl/libGLESv1_CM_MRVL.so
08-09 11:29:56.242: D/libEGL(12591): loaded /system/lib/egl/libGLESv2_MRVL.so
08-09 11:29:56.265: D/GC(12591): <tid=12591> OES20 ===> GC Version   : GC Ver rls_pxa988_JB42_R1_RC2_GC13 
08-09 11:29:56.273: D/v_gal(12591): [tid=12591] gcmONERROR: status=-13(gcvSTATUS_NOT_SUPPORTED) @ gcoHARDWARE_IsFeatureAvailable(2672)
08-09 11:29:56.289: D/OpenGLRenderer(12591): Enabling debug mode 0
08-09 11:29:56.312: D/dalvikvm(12591): GC_FOR_ALLOC freed 1463K, 24% free 7962K/10432K, paused 25ms, total 25ms
08-09 11:29:56.320: I/dalvikvm-heap(12591): Grow heap (frag case) to 9.577MB for 1109392-byte allocation
08-09 11:29:56.343: D/dalvikvm(12591): GC_CONCURRENT freed <1K, 14% free 9045K/10432K, paused 2ms+2ms, total 27ms
08-09 11:29:56.343: D/dalvikvm(12591): WAIT_FOR_CONCURRENT_GC blocked 25ms
08-09 11:29:56.406: D/GC(12591): <tid=12591> OES11 ===> GC Version   : GC Ver rls_pxa988_JB42_R1_RC2_GC13 
08-09 11:29:56.437: I/OnCreate(12591): cccccccccccc
08-09 11:29:56.445: I/OnSize(12591): ssssssssssss
08-09 11:29:56.445: D/DEBUG(12591): GL symbol lib read failed.
08-09 11:29:56.445: D/DEBUG(12591): MVT symbol lib read failed.

这是我主要代码

您好,检查一下你的缓存路径下是否有缓存生成。路径就打开MVT矢量瓦片的第二个参数
...