문제

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.. enter image description here

enter image description here enter image description here 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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top