xitingTick / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

Infinite maps drawn #504

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Using Offline MBtiles-file

What is the expected output? What do you see instead?
I would expect that the map is shown one time.
Instead the map is drawn infinitely often in every direction.

What version of the product are you using? On what operating system?
Osmdroid 4.0

Original issue reported on code.google.com by Perebner...@gmx.at on 21 Dec 2013 at 2:50

GoogleCodeExporter commented 8 years ago
Could you please provide more information? Reproducing it in the 
OpenStreetMapViewer example project or providing a (small) MBtiles file that 
exhibit this issue would be helpful.

Original comment by kurtzm...@gmail.com on 31 Dec 2013 at 8:19

GoogleCodeExporter commented 8 years ago
I wrote a small example project. But I can't add files since I got: "Issue 
attachment storage quota exceeded." An example mbtiles is stored at: 
http://mexx.devsub.net/namalsk_3.mbtiles
For generating the mbtiles we use mb-util.

MapView mapView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        RelativeLayout root = (RelativeLayout) findViewById(R.id.root);

        File file = new File(Environment.getExternalStorageDirectory(), "namalsk_3.mbtiles");
        MBTilesFileArchive archive = MBTilesFileArchive.getDatabaseFileArchive(file);

        XYTileSource MBTILESRENDER = new XYTileSource("mbtiles", ResourceProxy.string.offline_mode, 0, 2, 256, ".jpeg", "http://example.org/");
        DefaultResourceProxyImpl resourceProxy = new DefaultResourceProxyImpl(this);
        SimpleRegisterReceiver simpleReceiver = new SimpleRegisterReceiver(this);

        IArchiveFile[] files = { archive };
        MapTileModuleProviderBase moduleProvider = new MapTileFileArchiveProvider(simpleReceiver, MBTILESRENDER, files);
        MapTileProviderArray mProvider = new MapTileProviderArray(MBTILESRENDER, null, new MapTileModuleProviderBase[] { moduleProvider });

        mapView = new MapView(this, 256, resourceProxy, mProvider);
        mapView.setMultiTouchControls(true);
        mapView.setUseDataConnection(false);

        mapView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
        root.addView(mapView,0);

    }

Original comment by Perebner...@gmx.at on 10 Jan 2014 at 5:01