如何在Android中使用nutiteq离线3D地图工作 [英] how to work on offline 3d maps using nutiteq in android

查看:830
本文介绍了如何在Android中使用nutiteq离线3D地图工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很抱歉,如果这个问题已经被问before.But我越来越麻烦的maps.I已经从GitHub下载源$ C ​​$ C下线的3D工作时:

https://github.com/nutiteq/hellomap3d

其工作良好,但其offlineActivity什么也不会发生,因为我搜索了很多,但没有工作code中的地图不work.Please帮助found.If您有任何的工作code,那么它的高度AP preciated。在此先感谢..!

下面的截图是要求的.nml或.dae file.After选择任一文件.nmldb图像显示(这里的人)上map.If Internet连接上,它显示了3D地图,如果连接处于关闭状态,仅.nml图像显示..

以下是其中我收到错误:

  com.nutiteq.rasterdatasources.HTTPRasterDataSource:加载失败瓦。无法解析主机otile1.mqcdn.com:没有与主机名关联的地址
 DataSourceFetchTask:无瓦片数据

这是code这是工作的罚款,如果互联网连接为ON,如果它的关闭,显示上面的错误,我只能得到一个男人的形象,而不地图(screenshot3):

  RasterDataSource数据源=新HTTPRasterDataSource(新EPSG3857(),0,18日,http://otile1.mqcdn.com/tiles/1.0.0/osm/{zoom}/ {X} / {Y} png格式);
        RasterLayer mapLayer =新RasterLayer(数据源,0);
        。mapView.getLayers()setBaseLayer(mapLayer);


解决方案

继code意味着你使用网上基础地图数据源来自MapQuest的:

  RasterDataSource数据源=新HTTPRasterDataSource(新EPSG3857(),0,18日,http://otile1.mqcdn.com/tiles/1.0.0/osm/{zoom}/ {X} / {Y} png格式);

您应该离线数据源替换它。有不同的选项,请参阅Nutiteq维基页面 https://github.com/nutiteq/ hellomap3d /维基/离线地图 - 瓷砖,在数据源是什么,你可以用AdvancedLayers项目得到的。

I am sorry if this question has been asked before.But I am getting trouble while working on offline 3d maps.I have downloaded the source code from github:

https://github.com/nutiteq/hellomap3d

Its working well but on its offlineActivity nothing happens,the map doesn't work.Please help as i searched a lot but no working code found.If any of you have a working code then its highly appreciated. Thanks in advance.. !

Following screenshot is asking for the .nml or .dae file.After selecting either of the file .nmldb image is shown(here a man) on map.If Internet connection is on,it shows the 3d map and if the connection is off, only the .nml image is shown..

Following are the errors which I am getting:

com.nutiteq.rasterdatasources.HTTPRasterDataSource: failed to load tile. Unable to resolve host "otile1.mqcdn.com": No address associated with hostname
 DataSourceFetchTask: no tile data

This is the code which is working fine if Internet connectivity is ON and if its OFf, the above error is shown and i get only a mans image without the map(screenshot3):

RasterDataSource dataSource = new HTTPRasterDataSource(new EPSG3857(), 0, 18, "http://otile1.mqcdn.com/tiles/1.0.0/osm/{zoom}/{x}/{y}.png");
        RasterLayer mapLayer = new RasterLayer(dataSource, 0);
        mapView.getLayers().setBaseLayer(mapLayer);

解决方案

Following code means that you use online base map data source from MapQuest:

RasterDataSource dataSource = new HTTPRasterDataSource(new EPSG3857(), 0, 18, "http://otile1.mqcdn.com/tiles/1.0.0/osm/{zoom}/{x}/{y}.png");

You should replace it with offline Data Source. There are different options, see Nutiteq wiki page https://github.com/nutiteq/hellomap3d/wiki/Offline-map-tiles for the Data Sources what you can get with AdvancedLayers project.

这篇关于如何在Android中使用nutiteq离线3D地图工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆