Giter VIP home page Giter VIP logo

Comments (6)

zebtin avatar zebtin commented on August 23, 2024

I have verified this happens only with databases generated using TileMill. When I try it with the ones provided by the sample it works perfectly.

from deprecated-mapbox-ios-sdk.

incanus avatar incanus commented on August 23, 2024

Hmm, this is odd. Can you maybe provide a sample MBTiles for me to try?

from deprecated-mapbox-ios-sdk.

zebtin avatar zebtin commented on August 23, 2024

I have done some additional testing and found something very odd.

I did all the testing using the Sample App to take code errors out of the equation.

So, using the provided mbtiles (control room) everything works as expected.

When using a mbtiles database generated using TilleMill not even the sample app works.

Here is an example mbtiles where this happens: https://www.dropbox.com/s/3h0vqcr1b8enrxc/metro%5B1.0%5D.mbtiles

When analyzing the structure of both databases you can clearly see they are completely different:

Test

So I went and manually changed the structure of the databse to match the Control Room database and it is all working now.

So I am absolutely sure the problem is that the databases being exported from TilleMill dont have the same format as the ones used on the example app.

Please tell me if I can do anything else to help, I could also send you the python script I used to fix the database structure.

from deprecated-mapbox-ios-sdk.

incanus avatar incanus commented on August 23, 2024

I'll check out this file you've linked, but the schema differences are ok. See the spec. The grid stuff is all optional and is related to interactivity. All you really need is metadata and tiles, which can be either a true table or a view as done in the left example following de-duplication optimizations.

from deprecated-mapbox-ios-sdk.

zebtin avatar zebtin commented on August 23, 2024

I was fighting with it in my head forever too, as it SHOULD work the same with tiles as a view instead of a table, but for some strange reason it doesn't load on my app and it doesn't load on the sample app either.

Hopefully you can figure out what is going on, what I did to make it work was create a new database with just two tables and copied the info from the tiles view on the original to an actual table on a new database.

from deprecated-mapbox-ios-sdk.

incanus avatar incanus commented on August 23, 2024

So I just grabbed your MBTiles and after renaming it to metro.mbtiles (to avoid the square brackets) it works fine on both sim and device. I'm doing this:

mapView.zoom = 13;

CLLocationCoordinate2D centerCoordinate = {
    .latitude  =  19.4326, 
    .longitude = -99.1331
};

[mapView setCenterCoordinate:centerCoordinate animated:NO];

After instantiating the map view in OfflineLayerViewController.

from deprecated-mapbox-ios-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.