Repository navigation
Fixed not setting hasInitialCenterCoordinate when manually setting the m... - #33
Conversation
|
@wsnook I agree, it should work by setting it from the controller. Still: why is there code for setCenterCoordinate and so on? Because apparently we want to set this flag as soon as the 'user' of the library sets the location of the map which is not the default location. As a result, setting the map camera with the code I postet, I set the map camera (to move the map to the point I want to have it - instead of setCenterCoordinate). The map then jumps back to the default coordinate as soon as it downloaded the description JSON file. So this code should definitely be merged to save other users some headache on why the map is always jumping back instantly after setting it up. |
|
You mentioned "The map then jumps back to the default coordinate as soon as it downloaded the description JSON file." That sounds a lot like the known timing issue that #29 describes. |
|
To answer your question about "why is there code for setCenterCoordinate and so on", the short answer is that I don't know. @incanus from Mapbox might be able to shed some light on that, but from what I understand, he's extremely busy with some other stuff at the moment. As I understand it, the original intent for MBXMapKit was just to demonstrate a proof of concept for what could be possible with MKMapKit by extending MKTileOverlay. This is a very young project, so there is plenty of room for making improvements, and my impression is that some of the original design decisions might need to be revisited as MBXMapKit evolves. |
This all came about because of the need to set Line 438 in 31be040 BOOL to know whether the user intended for a different setting that should not be overwritten was the solution.
|
|
In that case, I'm in favor of merging this change as part of a version 0.1.1 release. However, after that, I think it would be good to re-visit the design of how fetching TileJSON works (see #36). |
|
@KrauseFx, I'm working on a dev branch to merge the various pull requests that are presently open for mapbox/mbxmapkit. My plan is to resolve any conflicts, update the sample apps, see if it works on MacOS, etc. If you'd like me to include this fix, could you send me a pull request against my dev-0.1.1 branch over at https://github.com/wsnook/mbxmapkit/tree/dev-0.1.1? Thanks. |
|
@wsnook It's easier to just add the ~10 lines to your project ;) I get random GitHub 404 errors when trying to submit my PR |
|
Okay, sure, I'll do that. I asked for the pull request because I thought you might want credit for the contribution, but if you don't care about that, copy and paste is easy. |
|
Thanks, that's nice of you! |
|
Over the past couple weeks, I've actually talked to him and a couple other folks at Mapbox about what they want to do with MBXMapKit. It sounds like they're really busy right now with some other stuff, but they would like to put another release out relatively soon. I'm hoping that what I'm working on now will make that process easier for them. |
Working on fixing ;-) |
|
Thanks 👍 |
...ap camera