简体   繁体   中英

how to work on offline 3d maps using nutiteq in android

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM