0

I am trying to display map tiles using osmdroid. but it is displaying blank screen. This is my code:

map.setZ(100);
    map.setTileSource(new OnlineTileSourceBase("", 12, 18, 256, ".png",
            new String[]{"https://storage.googleapis.com/brainpool/user-files/brainpoollicense/maptiles/PL53LY4K0EDYMX/"}) {
        @Override
        public String getTileURLString(long pMapTileIndex) {
            return getBaseUrl()
                    + MapTileIndex.getZoom(pMapTileIndex)
                    + "/" + MapTileIndex.getX(pMapTileIndex)
                    + "/" + MapTileIndex.getY(pMapTileIndex)
                    + mImageFilenameEnding;
        }
    });

    map.setMultiTouchControls(true);
    IMapController mapController = map.getController();
    GeoPoint startPoint;
    startPoint = new GeoPoint(151.2927108765, -32.779342448);
    mapController.setZoom(12F);
    mapController.setCenter(startPoint);
    map.invalidate();
    createmarker();

This is output: enter image description here

Also, note that i am getting this in output always: W/OsmDroid: Problem downloading MapTile: /12/1674/2 HTTP response: Not Found

My question is when getTileURLString method is called? because it is called for the values which are taking wrong z/x/y which do not exist on the server.

Mayura Devani
  • 440
  • 3
  • 17
  • `It is always taking wrong z/x/y ` Who? Aren't you supplying those values yourself? We cannot see what you ask. – blackapps Dec 10 '21 at 13:22
  • getTileURLString is called automatically according to center and zoom level. I want to know how it is called by library. – Mayura Devani Dec 10 '21 at 13:34

0 Answers0