Skip to content
This repository was archived by the owner on Aug 25, 2023. It is now read-only.

Fixed not setting hasInitialCenterCoordinate when manually setting the m... - #33

Merged
incanus merged 1 commit into
mapbox:masterfrom
KrauseFx:patch-1
Feb 21, 2014
Merged

incanus merged 1 commit into
mapbox:masterfrom
KrauseFx:patch-1

Conversation

@KrauseFx

@KrauseFx KrauseFx commented Feb 6, 2014

Copy link
Copy Markdown
Contributor

...ap camera

@ghost

ghost commented Feb 6, 2014

Copy link
Copy Markdown

@KrauseFx, have you tried just setting those properties on the MBXMapView from your view controller. I don't think it's necessary to change MBXMapView to accomplish what you're after. For some examples and related camera considerations, you might have a look at issue #29.

@KrauseFx

KrauseFx commented Feb 6, 2014

Copy link
Copy Markdown
Contributor Author

@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.

@ghost

ghost commented Feb 6, 2014

Copy link
Copy Markdown

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.

@ghost

ghost commented Feb 6, 2014

Copy link
Copy Markdown

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.

@incanus

incanus commented Feb 7, 2014

Copy link
Copy Markdown
Contributor

why is there code for setCenterCoordinate and so on

This all came about because of the need to set self.hasInitialCenterCoordinate = YES as in

self.hasInitialCenterCoordinate = YES;
. This came from a bug described in #8 where the user would set a center during map view init, but then the async metadata request to grab the map's properties would override it. Having a BOOL to know whether the user intended for a different setting that should not be overwritten was the solution.

@ghost

ghost commented Feb 7, 2014

Copy link
Copy Markdown

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).

@ghost

ghost commented Feb 17, 2014

Copy link
Copy Markdown

@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.

@KrauseFx

Copy link
Copy Markdown
Contributor Author

@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

@ghost

ghost commented Feb 17, 2014

Copy link
Copy Markdown

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.

@KrauseFx

Copy link
Copy Markdown
Contributor Author

Thanks, that's nice of you!
Looks like @incanus wants to be the only contributor of the main repo: https://github.com/mapbox/mbxmapkit/graphs/contributors

@ghost

ghost commented Feb 17, 2014

Copy link
Copy Markdown

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.

@incanus

incanus commented Feb 18, 2014

Copy link
Copy Markdown
Contributor

Looks like @incanus wants to be the only contributor of the main repo:

Working on fixing ;-)

@incanus incanus added this to the 0.2.0 milestone Feb 18, 2014
@incanus incanus added the bug label Feb 18, 2014
@incanus
incanus merged commit 001cf63 into mapbox:master Feb 21, 2014
@KrauseFx

Copy link
Copy Markdown
Contributor Author

Thanks 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants