mapbox / mbxmapkit

DEPRECATED - Lightweight Mapbox integration with MapKit on iOS
http://mapbox.com/mbxmapkit
Other
335 stars 85 forks source link

Discuss API refinements, including caching #73

Closed ghost closed 10 years ago

ghost commented 10 years ago

Over at issue #61 we considered a refactored design for asynchronously loading TileJSON, and at pull request #71 we discussed my issue61 branch with a new approach to solving problems around the asynchronous TileJSON stuff.

The conclusion from #71 seems to be that the general approach in the issue61 branch is sound, but it needs to be packaged within an API which feels consistent with Apple's API's in general, and MKMapKit in particular. So this ticket is for discussing refinements to the API. One of the big open questions is what the caching will look like.

My plan for the moment is:

I'm guessing this iteration will reach a good stopping point by approximately March 20th (next Thursday).

ghost commented 10 years ago

I just hit a significant milestone. Basically the first draft of my sqlite stuff for offline maps is complete and working. By that I mean I can create a db using an array of urls which need to be downloaded, I can read progress counts out of it, I can read batches of urls (using SELECT... LIMIT) to download, I can write image blobs and status codes back out, I can save the completed db to a unique filename, and I can find and display completed offline map db's on the map. This is progress!

The main things left on the todo list for this ticket are:

ghost commented 10 years ago

Status update: rough cut at dynamically generating the tile urls is working, but the marker icon stuff needs work in a couple different ways. When I hardcoded a url for a marker icon that I knew was in the markers.geojson, it didn't show up on the map, and that's a bit puzzling. Also, on the MBXOfflineMapDownloader side, I need to implement something to download and parse the marker geojson at the time that the list of urls is being created.

ghost commented 10 years ago

Offline maps work on iOS, markers included!

incanus commented 10 years ago

Handy pre-PR link comparing the issue73 branch against master:

https://github.com/mapbox/mbxmapkit/compare/master...issue73

incanus commented 10 years ago

This seems really well thought-out, @wsnook! I can't possibly hope to totally grok 65 commits and 32 changed files with 4,961 additions and 5 deletions just yet, particularly the whole functionality of MBXOfflineMapDownloader and its dual queue system, but here's how I see things proceeding:

  1. We address some more important comments below leading up to / when we voice Tuesday.
  2. We consider some other comments, more as backburner things that we can discuss on GitHub.
  3. We squash these into a new commit or handful of commits and open a pull request for more in-depth review and testing, getting it into master for some testing before release of 0.3.0.

Main comments (voice)

Minor comments (online)

ghost commented 10 years ago

The Plan from voice chat just now with @incanus... I need to:

  1. Squash all these commits into a new branch and create a new issue/PR for discussing that branch
  2. Track down a glitch where the offline map downloader can hang up when changing states. This is probably a new thing that I introduced in the past couple days with the marker icon code.
  3. Write up some instructions about how to use the sample app to exercise and test the capabilities of the api, perhaps in the readme.
  4. Start looking at what needs to happen for cleaning out cruft and polishing things for up an 0.3.0 release. First item on that list should be replacing the main sample app with the code from the v030 sample app. What to do about OS X support is still unresolved
ghost commented 10 years ago

I'm closing this to be continued over at #79.