I have my offline map tiles on the android device here, they are already unzipped:

/sdcard/application-name/uuid/tiles

and I have set the OSM cache like so:

File applicationDir = new File(Environment.getExternalStorageDirectory(), File.separator + "application-name" + File.separator + "uuid" + File.separator);
OpenStreetMapTileProviderConstants.setCachePath(applicationDir.getAbsolutePath());

I then set up the TileSource:

ITileSource tileSource = new XYTileSource ("tiles", 0, 18, 256, ".png", new String[0]);

and the TileProvider:

tileProvider = new MapTileProviderBasic(getActivity());
tileProvider.setTileSource(tileSource);

I have set

OpenStreetMapTileProviderConstants.DEBUGMODE = true;

and I get a load of Tile doesn't exist messages.

Any suggestions gratefully received! Thanks.

asked 09 Aug '16, 11:45

Nome's gravatar image

Nome
66124
accept rate: 100%

edited 09 Aug '16, 17:36

scai's gravatar image

scai ♦
31.2k18281436

1

It would help if you could like to what Android software you're using to do this.

I'm guessing osmdroid based on https://www.google.co.uk/search?q=new+XYTileSource&ie=utf-8&oe=utf-8&rls=org.mozilla:en-GB:unofficial&client=seamonkey-a&gws_rd=cr , but it'd be nice to clarify.

(09 Aug '16, 11:55) SomeoneElse ♦
2

Yep, sorry it's osmdroid.

(09 Aug '16, 14:27) Nome

This is answered over on StackOverflow here:

http://stackoverflow.com/a/39078244/1860015

permanent link

answered 22 Aug '16, 12:23

Nome's gravatar image

Nome
66124
accept rate: 100%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×161
×95
×40

question asked: 09 Aug '16, 11:45

question was seen: 4,124 times

last updated: 22 Aug '16, 12:23

powered by OSQA