Commit Graph

4631 Commits

Author SHA1 Message Date
Justin R. Miller
ccc631886f [publish ios-v0.4.2] 2015-06-30 10:10:55 -04:00
Justin R. Miller
4afab3c187 bump podspec to 0.4.2 2015-06-30 10:10:32 -04:00
Thiago Marcos P. Santos
dc9a88629b Check if the style was loaded before rendering
We now drive rendering from the main thread calling renderSync(),
but if we do it just after we set the style URL it will assert
because renderSync() expects the style to be fully loaded.
2015-06-30 15:39:41 +03:00
John Firebaugh
923ea1456a Update test suite 2015-06-29 18:04:17 -07:00
John Firebaugh
42c06e7039 Use array of structs rather than parallel arrays for annotations 2015-06-29 10:54:17 -07:00
John Firebaugh
f675d23314 Update test suite 2015-06-29 10:41:02 -07:00
John Firebaugh
1007410cda Update test suite 2015-06-29 10:21:37 -07:00
Konstantin Käfer
45d0cbb4c7 add assert_always() macro for release build assertions 2015-06-29 11:32:19 +02:00
Thiago Marcos P. Santos
e66bd34bff Typo 2015-06-29 11:24:15 +03:00
Thiago Marcos P. Santos
0fdb4f7b4c Add YCM config file for VIM users
Tailor-made for Mapbox GL Native.

For instructions of how to use, see:
https://github.com/Valloric/YouCompleteMe
2015-06-29 11:18:24 +03:00
Minh Nguyễn
ac2ad993a5 Fit to coordinates
Whoever determined the boundaries of the District of Columbia did not have fit-to-bounds implementations in mind. With this change, shapes that are not unrotated rectangles fit much, much better.
2015-06-26 21:46:15 -07:00
Justin R. Miller
7b22caddd0 [publish ios-v0.4.1] 2015-06-26 21:22:04 -07:00
Justin R. Miller
52514542d1 bump podspec & move back to symbols version 2015-06-26 21:21:41 -07:00
Minh Nguyễn
5ea41a5583 Avoid removing content size constraints
Also, on iOS 8.0+, use `+[NSLayoutConstraint activateConstraints:]` and `+deactivateConstraints:` to efficiently prevent redundant constraints from lingering.

Fixes #1779.
2015-06-26 14:54:53 -07:00
John Firebaugh
ea5c56d2bf Don't send MapChangeRegionIsChanging on every render 2015-06-26 10:32:08 -07:00
John Firebaugh
95351dd906 Send MapChangeRegionIsChanging notifications 2015-06-26 10:32:07 -07:00
John Firebaugh
d193083513 Remove duration argument from View::notifyMapChange
Fixes #1026
2015-06-26 10:32:07 -07:00
John Firebaugh
e6a576f6eb currentState() ⇢ getState() 2015-06-26 10:32:07 -07:00
John Firebaugh
07a6d2ef64 Move Transform from MapData to Map
Pass current state to MapContext where needed. Remove mutex from
Transform.
2015-06-26 10:32:07 -07:00
John Firebaugh
e87a36444f Move getMin/MaxZoom to TransformState 2015-06-26 10:32:07 -07:00
John Firebaugh
874aa69efb Inline updateTiles and recalculateStyle 2015-06-26 10:32:07 -07:00
Konstantin Käfer
dca42018d2 drive Android rendering from the main thread via invalidate() calls 2015-06-26 10:32:06 -07:00
Konstantin Käfer
84e2ea886d drive map rendering from main thread 2015-06-26 10:32:06 -07:00
Konstantin Käfer
740281cc89 remove unused renderAsync() function 2015-06-26 10:32:06 -07:00
Minh Nguyễn
29fd554c32 Implemented -setVisibleCoordinateBounds:
Followup to #1783: Implemented the non-animated version of fit to bounds and makes it a KVO-compliant property.
2015-06-25 22:26:35 -07:00
Minh Nguyễn
bcbb56c188 Maintain rotation when fitting to bounds
Also fit to the rotated bounds. A little more verbose than necessary due to <http://stackoverflow.com/a/2357688/4585461>.

ref mapbox/mapbox-gl-js#1338
2015-06-25 21:54:57 -07:00
Minh Nguyễn
1d11624efd Test fit to bounds; added MGLCoordinateBounds functions
Added a bunch of functions to work with MGLCoordinateBounds in a separate header analogous to MKGeometry.h. Added resolution-independent tests for common fit to bounds scenarios.
2015-06-25 21:54:57 -07:00
Minh Nguyễn
68e404c522 Fit to bounds with padding
Each side of the bounding box is specified independently, allowing more flexibility than the offset + padding construct supported in mapbox/mapbox-gl-js’ Camera.
2015-06-25 21:54:57 -07:00
Minh Nguyễn
c57799f26c Reimplemented fit to bounds
The new implementation is now public and takes advantage of MGLCoordinateBounds. It is re-ported from `Camera.prototype.fitBounds()` in mapbox/mapbox-gl-js to ensure correct behavior. A new function, MGLCoordinateBoundsMake(), makes it easier to create an MGLCoordinateBounds for use with this method.
2015-06-25 21:54:53 -07:00
Jason Wray
f5c1e2630e Remove redundant didChangeAuthorizationStatus: in favor of didFailWithError:
Listening to both `locationManager:didChangeAuthorizationStatus:` and `locationManager:didFailWithError:` delegate methods is unnecessary. Setting `showsUserLocation = NO` in the first means that the second never gets called and our `mapView:didFailToLocateUserWithError:` delegate method never gets called.
2015-06-25 16:02:55 -07:00
Brent Whitman
64c05d02e2 Fix typo which caused MGLMultiPoint to return longitude as latitude of bounds. 2015-06-25 15:00:21 -07:00
Brent Whitman
ae8af8f2ea Add xcpretty dependency to README 2015-06-25 14:59:27 -07:00
Minh Nguyễn
fc209e31c5 Reversed direction to be clockwise
For consistency with MapKit, the Google Maps SDK, and these methods’ own documentation.

Fixes #1780.
2015-06-25 10:20:48 -07:00
Thiago Marcos P. Santos
7a30a0d316 Be more strict on escaping at the test regex
Apparently libc++ is more strict about escaping
than libstdc++.

Also, restrict the set of tiles we expect to the
only possible tiles.
2015-06-25 18:13:01 +03:00
Thiago Marcos P. Santos
07086981fe Get rid of Environment et al.
mbgl::Environment is not used anymore and can
removed.
2015-06-25 16:26:22 +03:00
Thiago Marcos P. Santos
e32b0b7e20 Introduce GLObjectStore
Make a class for keeping GL objects ids and attach it
to the ThreadContext instead of hanging it on the Environment.
2015-06-25 16:26:21 +03:00
Thiago Marcos P. Santos
be4cb6786b Make the FileSource available from the ThreadContext
For now we set the FileSource for the Worker context
but in the future after fixing #1664 we can assert()
that FileSource are set only for the Map thread context.
2015-06-25 16:26:21 +03:00
Thiago Marcos P. Santos
b56c356de7 Use ThreadContext data for logging
Do not use the Environment anymore. The Environment ID is not
really necessary anymore as we are forwarding exceptions to the
main thread, so we always know which Map object triggered the
error.
2015-06-25 16:26:21 +03:00
Thiago Marcos P. Santos
57ddb386d8 Add unit tests for ThreadContext 2015-06-25 16:26:21 +03:00
Thiago Marcos P. Santos
a8b6b67dfe Introduce the ThreadContext
mbgl::Thread will keep a ThreadContext for each running instance
in a thread_local so we don't need to lookup a man in the Environment
every time we need some info about the current thread.

This patch is moving the ::currentlyOn check used on Debug build from
the Environment class to the ThreadContext.
2015-06-25 16:26:21 +03:00
John Firebaugh
7bb86368d4 Remove unused 2015-06-24 14:56:48 -07:00
John Firebaugh
a05698fe06 Remove MapData dependency from AnnotationManager 2015-06-24 13:08:37 -07:00
John Firebaugh
4ba78b6bcf Transform needs only a single TransformState 2015-06-24 13:08:36 -07:00
Bruno de Oliveira Abinader
3396bcaaac Cleaned up remaining bool function return values 2015-06-23 19:59:22 +03:00
Bruno de Oliveira Abinader
71ed184bc4 Improve readibility for style parser results
Introduces StyleParser::Result being a std::tuple<Status, T>, where
StyleParser::Status is a boolean enumerator which improves readibility.
2015-06-23 19:58:14 +03:00
Bruno de Oliveira Abinader
7bfae2a1a5 Fix result value from parseProperty when T = std::array<float, 2> 2015-06-22 22:46:37 +03:00
Thiago Marcos P. Santos
43d69b6a65 Fix resource loading flaky test
When testing failed vector tiles requests, we check for error messages
of a very specific tiles, but mbgl will requests 4 tiles.

We might get the error callback before the tile we are checking for
reports error, so the test fails.

Now we use a regex to match the log message we are looking for.
2015-06-22 22:00:24 +03:00
Brad Leege
641046138c Adding extraneous settings files to gitignore 2015-06-22 13:10:45 -05:00
Minh Nguyễn
555e1f141e Substitute lightweight generics macros in docset
Followup to 91641ffb01 for #1711: also preprocess the generics macros when generating a docset.
2015-06-22 10:41:05 -07:00
Nicholas Hallahan
ef31fc5aed attempting to put one annotation on the map - gets to the native call and then nothing happens 2015-06-20 16:21:41 -07:00