NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I created an Android Mobile Application which uses OSMDroid Mapview. It loads perfectly fine from zoom levels 18 and larger. However it only rescales and never serves me tiles from 19 and below.

I have my own tile server using Mapnik, Renderd, Mod_tile so on and so forth. I've set my application to use my own tile server too. Using/Checking with .../osm_tiles/{zoom}/{x}/{y} I know it goes down to level 20, as I've set because it returns an image, no error nor 404. It simply doesn't serve it to my mobile device.

I've checked the console logs and if needed, it downloads the tiles. But once it reaches zoom level 19, it stops and rescales instead. Is there some sort of.... Other settings I need to put?

mv.setUseDataConnection(true);
mv.setMinZoomLevel(16);
mv.setMaxZoomLevel(20);
mv.getController().setZoom(17);
mv.setMultiTouchControls(true);

ITileSource tileSource;
tileSource = new XYTileSource("custom", ResourceProxy.string.mapnik, 16, 20, 256, ".png", custom);
TileSourceFactory.addTileSource(tileSource);

By the way, the last variable "custom" is actually declare like so:

String custom[] = {"http://mytileserver/osm_tiles/"};

asked 21 Jan '16, 06:17

Damian's gravatar image

Damian
46113
accept rate: 0%

edited 21 Jan '16, 06:31


I found the answer, it seems I had forgotten to add the line

mv.setTileSource(TileSourceFactory.getTileSource("private"));

After creating and adding the source I need to also set it.

permanent link

answered 21 Jan '16, 08:04

Damian's gravatar image

Damian
46113
accept rate: 0%

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:

×710
×204
×181
×99

question asked: 21 Jan '16, 06:17

question was seen: 3,773 times

last updated: 21 Jan '16, 08:04

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum