0

I have my own tile server of openmaptiles.com.

I am using XYTileSource to use the map

    map = findViewById(R.id.map);

    ITileSource t = new XYTileSource("test", 10 , 18, 256, "", new String[]{"http://192.168.43.84:8001/styles/dark-matter/"}){

        @Override
        public String getTileURLString(long pMapTileIndex) {
            String mImageFilenameEnding = ".png";

            String genuRL = getBaseUrl() + (int) map.getProjection().getZoomLevel() + "/"
                    + map.getProjection().getOffsetX() + "/" + map.getProjection().getOffsetY()
                    + mImageFilenameEnding;
            System.out.println(genuRL);
            return genuRL;
        }

    };
      map.setTileSource(t);

However I can't see the map in the app.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.