FabianCoronel009 / osmdroid

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

Tiles not getting loaded when mapview is moves with thrid party jar #323

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create custom tiles and place them under sdcard as required for osmdroid
2. use thrid party jar (osmdroid-third-party-3.0.7.jar) along with 
osmdroid-android-3.0.7.jar to load custom tiles on google maps
3. start app. custom Map tiles get loaded.
4. Move/drag the map such a way that the loaded tiles are out of the device 
window. 
5. Drag back to the initial location 

What is the expected output? What do you see instead?
Expected to load back the custom tiles. Loads Google tiles instead

What version of the product are you using? On what operating system?
osmdroid-third-party-3.0.7.jar) along with osmdroid-android-3.0.7.jar

Please provide any additional information below.

code using for loading custom tiles

                        mapView.getOverlays().clear();
            mProvider = new MapTileProviderBasic(getActivity().getApplicationContext());
            mProvider.setTileSource(TileSourceFactory.FIETS_OVERLAY_NL);
            mTilesOverlay = new GoogleTilesOverlay(mProvider,getActivity().getApplicationContext());
            mTilesOverlay.setUseDataConnection(false);
            mTilesOverlay.useDataConnection();
            mapView.getOverlays().add(mTilesOverlay);

Original issue reported on code.google.com by nikhil.s...@gmail.com on 16 Mar 2012 at 4:06

GoogleCodeExporter commented 8 years ago
The code below shows how I use this. I do use a dataconnection however.
This works well for me, except for issue 326.

==========
    public static final OnlineTileSourceBase FIETS_OVERLAY_NL = new XYTileSource("Fiets",
            null, 3, 18, 256, ".png",
            "http://overlay.openstreetmap.nl/openfietskaart-overlay/");

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        // Google map base layer
        this.mapView = (MapView) findViewById(R.id.mapview);
        this.mapView.setBuiltInZoomControls(true);
        this.mapController = mapView.getController();

        // Add tiles layer
        this.mProvider = new MapTileProviderBasic(getApplicationContext());
        this.mProvider.setTileSource(FIETS_OVERLAY_NL);
        this.mTilesOverlay = new GoogleTilesOverlay(this.mProvider, this.getBaseContext());
        this.mapView.getOverlays().add(0, this.mTilesOverlay);
        this.mapView.invalidate();
    }
==========

Original comment by alex.vanderlinden on 25 Mar 2012 at 6:57