Commit Graph

5798 Commits

Author SHA1 Message Date
Minh Nguyễn
0686807a21 Audited shape annotation classes for nullability
Audited various classes to match MapKit. Also, `-[MGLAnnotation title]` is nullable because titles are optional for shape annotations.
2015-06-16 16:32:57 -07:00
Mike Morris
6081f15237 v1.1.1 [publish binary] 2015-06-16 15:37:02 -04:00
Mike Morris
7315212cb8 Merge pull request #136 from mapbox/mbgl-v0.3.5
bump mbgl to v0.3.5
2015-06-16 15:35:19 -04:00
Mike Morris
a25fa2e076 bump mbgl to v0.3.5
add geojsonvt dependency in Makefile

update changelog
2015-06-16 14:21:27 -04:00
Minh Nguyễn
416928f824 Defer to MGLMultiPoint for overlayBounds implementation
Fixes #1730.
2015-06-16 11:06:46 -07:00
Mike Morris
254a437051 Merge pull request #135 from mapbox/travis-publish
fix clang CXX matching
2015-06-16 13:35:57 -04:00
Mike Morris
7be5f15e50 fix clang CXX matching [publish binary]
explicitly set CXX on OS X
2015-06-16 12:54:00 -04:00
Minh Nguyễn
df6ab1dc00 Corrected bundledStyleURLs doc comment
Per f46328655e (commitcomment-11695358).
2015-06-16 09:45:10 -07:00
Thiago Marcos P. Santos
4623baa1a5 Add tests for renderStill() misuse 2015-06-16 14:09:51 +03:00
Thiago Marcos P. Santos
57c34747a2 Report errors for renderStill() misuse using the callback
Use the callback provided for reporting the errors instead of throwing
an exception. The problem with the exception is it will happen on the
Map thread which makes it impossible to the user of our API to catch,
ultimately resulting in a crash.

In the scenario of not providing a callback, we just print an error.
2015-06-16 14:06:29 +03:00
Justin R. Miller
556938e8bb [publish ios-v0.3.5] 2015-06-15 22:20:52 -07:00
Justin R. Miller
d9f09596fb bump podspec version 2015-06-15 22:20:16 -07:00
Justin R. Miller
8dbf2bf8da refs #1483: move to simple tagging scheme, but preserve platform in publish command 2015-06-15 22:19:34 -07:00
Justin R. Miller
bd0bf294bf squash of #1655: shape annotations support for core & iOS 2015-06-15 18:30:39 -07:00
Jason Wray
e75e538ddb Add location tests for iOS
- Adds testDelegatesStartStopLocatingUser: Tests mapViewWillStartLocatingUser and mapViewDidStopLocatingUser delegate methods
- Adds testUserTrackingModeFollow
- Adds testUserTrackingModeFollowWithHeading (disabled because of library bug)

Fakes user location via swizzled CLLocationManager and hard-coded mock coordinates and heading.
2015-06-15 16:42:32 -07:00
John Firebaugh
69cf6ed3d2 Reenable iOS tests, default hardware/iOS version only for now
Use of the -destination argument to either xcodebuild or xctool
fails on Travis.

Refs #1452
2015-06-15 16:12:14 -07:00
Minh Nguyễn
714b68f7b3 Revert "use array of structs rather than parallel arrays for annotations"
This reverts commit 2435c1ad26 (#1710), which needs to be revisited in light of #1655, which is a much higher priority at the moment.
2015-06-15 15:58:22 -07:00
Mike Morris
b8c45b6273 match all clang++ versions [publish binary] 2015-06-15 17:56:22 -04:00
Justin R. Miller
a08bcb6d0e update README for debug info on test app 2015-06-15 14:35:57 -07:00
Mike Morris
6f4e727654 add npm badge [skip ci] 2015-06-15 17:15:58 -04:00
Mike Morris
5c8107ee3b v1.1.0 [publish binary] 2015-06-15 17:04:53 -04:00
Mike Morris
a29c7c34dc Merge pull request #130 from mapbox/changelog
update changelog and readme
2015-06-15 16:57:47 -04:00
Mike Morris
73abfc3d08 update changelog and readme [skip ci]
- Document Node.js v0.12.x and io.js support
- Document map.release functionality.
- Add notes on garbage collection and request handling.
- Update binary platforms and build instructions.
- Document API token FileSource implementation from
  https://github.com/mapbox/mapbox-gl-native/pull/1607
- Update Kind enum values.
2015-06-15 16:53:40 -04:00
Mike Morris
e2c56742a8 Merge pull request #129 from mapbox/129-pending_requests_hanging
Map destruction hanging with pending requests
2015-06-15 16:47:53 -04:00
Mike Morris
e06bf232f4 request coalescing fixes #114 2015-06-15 14:52:35 -04:00
Thiago Marcos P. Santos
a6ea979ec5 Add test case for the request coalescing 2015-06-15 13:54:20 +03:00
Thiago Marcos P. Santos
0d2543675f Update the tests
Reflect the changes on the previous MBGL version bump and
unskip tests that should pass now.
2015-06-15 13:54:20 +03:00
Thiago Marcos P. Santos
b602835626 Fix invalid NodeRequest reference
On the code path built with node v0.12.4, we are storing
an invalid reference to NodeRequest on the "pending" list. It will
crash when we need to access it like we do when canceling a request.

Ideally we should just have a "std::unordered_map<mbgl::Resource,
v8::UniquePersistent>" but that is not possible because the move
semantics are not fully implemented until V8 v4.3.22. It can be used
on a std::vector but not on a std::map.

See: https://code.google.com/p/v8/issues/detail?id=3669

The solution for keep using C++11 move semantics is to declare the
v8::CopyablePersistentTraits shenanigans and explicitly clear the
v8::Persistent (like we do already for node v0.10).

When Node gets V8 v4.3.22+ we can go back to v8::UniquePersistent
with a more clear implementation.
2015-06-15 13:54:20 +03:00
Thiago Marcos P. Santos
34ef7ac003 Implement request coalescing and synchronous request cancellation
When requests are made to the FileSource, we now group them by
resource, similarly to what is done on the native implementation. The
file source will reuse the same Response for all the requests on the
observer list.

The NodeRequest no longer holds a reference to the mbgl::Request, so
we can cancel it synchronously. This is needed to avoid a deadlock
when releasing the NodeMap resources with pending requests.

Before:

- Main thread | NodeMap::release()
- Main thread | mbgl::~Map()
- Main thread | Blocks waiting for the Map thread to join
- Map thread  | mbgl::Request::cancel()
- Map thread  | NodeFileSource posts the "cancel" message to main thread
- *deadlock*  | Map thread cannot join because mbgl::Request holds a
                reference to the Map thread main loop. Main thread is
                blocked, never gets the "cancel" message.

Now:

- Main thread | NodeMap::release()
- Main thread | mbgl::~Map()
- Main thread | Blocks waiting for the Map thread to join
- Map thread  | Request::cancel()
- Map thread  | NodeFileSource::cancel(), destroys the mbgl::Request
                synchronously, mutex guarded access. We also send
                a notification to cancel the NodeRequest on the main
                thread.
- Map thread  | Map thread joins.
- Main thread | NodeMap::release() returns
- Main thread | NodeRequest gets canceled. If NodeRequest replies
                before it gets the "cancel" message, nothing happens,
                notification gets discarded.
2015-06-15 01:52:15 +03:00
hanchao
b8c251592a fix roundabout not closed #1450 2015-06-14 07:56:31 +02:00
Minh Nguyễn
450a6beae0 Restored nullability compatibility shim
This reverts commit a425df0f95f5f0088444b8ebc67708756ff962aa for compatibility with Xcode 6.1.
2015-06-13 19:58:59 -07:00
Minh Nguyễn
4176d21d1c Namespaced reachability notification constant
Fixes #1717.
2015-06-12 11:54:46 -07:00
Thiago Marcos P. Santos
d515f8d77d Bump Mapbox GL Native to v0.3.3 2015-06-12 13:51:52 +03:00
Ansis Brammanis
7dc880080e update test suite to reenable symbol tests 2015-06-11 18:48:07 -04:00
Konstantin Käfer
2435c1ad26 use array of structs rather than parallel arrays for annotations 2015-06-11 17:26:37 -04:00
Minh Nguyễn
f46328655e Audited headers for nullability
Added some nullability qualifiers in method implementation selectors for consistency with declarations.

The user dot view now has a non-zero size. Previously only its layer was sized properly. Also resolved some pedantic warnings about missing designated initializer overrides.

Xcode 6.3 or above is now required for building this project.
2015-06-11 11:37:23 -07:00
Ansis Brammanis
cfee5aa8ef fix text-letter-spacing render test by using float 2015-06-09 11:07:17 -04:00
Konstantin Käfer
0c5f8a2c59 press 1 through 6 to add 10^(n-1) points in the current viewport
(only works correctly when rotated to north, but this is a just a debug functionality anyway)
2015-06-09 10:29:07 -04:00
Thiago Marcos P. Santos
e07ecfaa5f Merge pull request #133 from mapbox/remove_unused
Removed unused method on NodeFileSource
2015-06-09 11:04:04 +03:00
Konstantin Käfer
f85889dc75 allow constructing LatLng/LatLngBounds objects from TileIDs 2015-06-08 16:13:37 -04:00
Thiago Marcos P. Santos
b4f21b73d0 Removed unused method on NodeFileSource 2015-06-08 15:40:45 +03:00
Justin R. Miller
5e661f7617 fix formatting 2015-06-07 17:31:28 -07:00
Thiago Marcos P. Santos
967fc73c15 Add documentation for TileData::State 2015-06-05 17:47:57 +03:00
John Firebaugh
a0503f3f5b Remove unused overscaling variables 2015-06-04 14:09:05 -07:00
Justin R. Miller
409cd1651f [publish ios-v0.3.4] 2015-06-04 14:01:15 -07:00
Justin R. Miller
9d8aae140c going back to b1 styles pin to avoid other complications for now 2015-06-04 14:00:52 -07:00
Justin R. Miller
ddcb01deb6 [publish ios-v0.3.4] 2015-06-04 13:45:11 -07:00
Justin R. Miller
d0c77aa73c bump podspec to 0.3.4 2015-06-04 13:44:42 -07:00
Justin R. Miller
012f5b43bd bump/correct styles pin 2015-06-04 13:44:42 -07:00
Thiago Marcos P. Santos
14083700e5 Test Map object destruction with pending requests
Test whenever destroying a Map object with requests pending
works and is done quickly.

The test injects artificial delays in selected requests and
tries to destroy the Map object afterwards.

Currently glyph requests are skipped because there is a bug
being worked on in a different issue.
2015-06-04 14:44:34 +03:00