Thiago Marcos P. Santos
d7fdcc73bf
[core] Get rid of ::unref() for Timer and AsyncTask
...
Not need, legacy from libuv. The RunLoop keep the main
loop running until is explicitly no longer needed.
2016-01-09 01:26:29 +02:00
John Firebaugh
e7b0b31d58
[core] Privatize SQLiteCache
2016-01-08 12:31:13 -08:00
Konstantin Käfer
bc309d84d7
[core] unify URL prefix detection (asset:// and mapbox://)
2016-01-08 12:14:39 +01:00
kelvinabrokwa
52844d4746
[core] fix text-offset bug
...
fixes #3469
2016-01-07 16:44:44 -08:00
Mike Morris
1dd1543905
[core] clip labels to tiles in MapMode::Still
2016-01-06 15:17:03 -08:00
Mike Morris
dc1630f50d
[core] always add labels to buffers in MapMode::Still
...
To minimize label clipping.
2016-01-06 14:10:23 -08:00
Minh Nguyễn
07cf1824d0
[core] Constrain minimum zoom level
2015-12-24 16:24:45 -08:00
Minh Nguyễn
63820d1b4f
[core] Always constrain width for zoom level
...
Even if the map supports wrapping the world, it isn’t necessary to show more than one full revolution of the world at a time. Removed a redundant zoom level clamp.
2015-12-24 16:24:45 -08:00
Minh Nguyễn
58264408c8
[core] Always return valid source zoom level
...
If for whatever reason a source doesn’t cover all the zoom levels allowed by the style – for instance, if different sources have different zoom ranges – use the nearest available zoom level.
2015-12-24 16:24:45 -08:00
John Firebaugh
d238e00d9b
[core] Remove RapidJSON and GeoJSONVT dependencies from SourceInfo
...
It's going to be exposed in the public core API as part of #3374 .
2015-12-23 14:48:41 -08:00
John Firebaugh
c972a251da
[core] Remove Resource dependency from low-level classes
...
These classes should not be coupled to domain-specific resource types.
2015-12-23 14:30:20 -08:00
John Firebaugh
16de579d7c
[core] Rationalize error handling for resource loading
...
* Standardize on std::exception_ptr as the error representation
(fixes #2854 ).
* Don't format textual strings at the error source; pass on the
constituent data via observer method parameters instead.
* Use the null object pattern to simplify observer notification code.
* Further refactoring for ResourceLoading tests.
2015-12-23 12:50:42 -08:00
John Firebaugh
1a5eab785c
Eliminate boolean return code
2015-12-22 14:54:35 -08:00
John Firebaugh
ab0efe5d00
[core] Move OnlineFileSource to platform
...
Preparation for OfflineFileSource which depends on SQLite
2015-12-22 12:09:14 -08:00
John Firebaugh
913f49c701
[core] Prepare for OfflineFileSource
...
* Rename existing DefaultFileSource to OnlineFileSource
* Restore a DefaultFileSource that's a passthrough to OnlineFileSource
2015-12-21 11:35:00 -08:00
Minh Nguyễn
d668c0fa84
[ios, osx] Better zoom level–altitude conversion
...
Greatly simplified conversions between zoom level and altitude. Adjusted field of view to more closely match MapKit. Conversions are now well within the same order of magnitude as MapKit at all latitudes.
Fixes #2266 .
2015-12-20 03:57:28 -08:00
Minh Nguyễn
a5230f3e11
[core] Clamp pitch in easeTo(), flyTo()
...
Also factored out the maximum pitch into a constant.
2015-12-19 23:14:01 -08:00
Minh Nguyễn
0a9b6a82e4
[core] Reformulated flyTo options
...
The speed and curve fields in CameraOptions have been replaced with velocity and minZoom fields, which expressed in screen units. Scaling and easing make it difficult to derive options that are expressed in physical units.
2015-12-19 20:33:18 -08:00
Minh Nguyễn
97c143a338
[core] Fly across the meridian or antemeridian, whichever is shorter
...
ref mapbox/mapbox-gl-js#1853
2015-12-19 20:33:18 -08:00
Minh Nguyễn
af9de6c0ac
[core] Refined and commented flyTo
...
Rewrote the flyTo implementation to more closely match GL JS’s implementation and the paper on which it is based.
Rewrote CameraOptions documentation. Only document units for generic types like double. The semantics of LatLng and Duration are already baked into the types; one just needs to look up the types’ definitions. Also, the […) is set notation, so the braces are supposed to be mismatched.
Fixes #3296 .
2015-12-19 20:31:40 -08:00
John Firebaugh
ec5afdd8b7
[core] Merge default_file_source_impl.hpp into default_file_source.cpp
...
After previous refactors, no other files include default_file_source_imp.hpp.
2015-12-18 15:48:20 -08:00
Brad Leege
925687ab06
[android] #3244 - Removing debug log statements
2015-12-18 14:39:02 -06:00
Brad Leege
f7d1a40350
[android] Camera API
2015-12-18 11:33:40 -08:00
John Firebaugh
e2ad0e008a
[core] Fix background-pattern origin
...
Regressed in 6e41664cb0 . This restores it
to the same behavior as gl-js, backed by test-suite tests.
2015-12-18 10:46:10 -08:00
Bruno de Oliveira Abinader
93725e062a
[core] Load sources only if there is at least one visible layer
2015-12-17 16:53:37 -08:00
Bruno de Oliveira Abinader
5a63ce5576
[core] Avoid loading source if a source request is currently ongoing
2015-12-17 16:53:37 -08:00
John Firebaugh
bf37904883
[core] Unbind current VAO before calling custom layer render function
2015-12-17 15:15:55 -08:00
John Firebaugh
fd248c1894
[core] Don't crash when destroying a copied CustomLayer
2015-12-17 15:15:55 -08:00
John Firebaugh
110f1ec796
[ios, android] Add methods to remove a custom layer
2015-12-17 15:15:55 -08:00
Minh Nguyễn
986e0ae39e
[core] Added special case for atomic flyTo()
...
startTransition isn’t well-suited to atomic transitions, which are expected to be synchronous and end up at the final state.
2015-12-17 10:24:58 -08:00
John Firebaugh
8a17d30c50
[android] Custom layer bindings
2015-12-16 11:03:32 -08:00
Minh Nguyễn
e304033552
[core] Fixed annotation icon replacement
...
Another pass at #3146 , including a unit test.
2015-12-15 21:04:15 -08:00
Thiago Marcos P. Santos
0f37b670ba
[core] Do not use std:: namespace for log2()
...
As some versions of libstdc++ don't have it.
2015-12-15 18:23:45 -08:00
Romain Quidet
b8be1f0632
code review updates: sprite_atlas brackets and nullable removed for reuseIdentifier of annotationImage
2015-12-15 16:36:17 -08:00
Romain Quidet
af45d87e54
2210: Sprites can be removed / updated correctly
2015-12-15 16:36:17 -08:00
Minh Nguyễn
e1854f0f26
[core] Corrected flying trajectory; pitched flight
...
Corrected some fairly opaque code that was incorrectly ported from GL JS the first time around in #3171 , causing the trajectory to extend far into the Earth’s orbit. Also transition pitch while flying, call transition frame/finish callback functions, and recognize the same “speed” and “curve” parameters that GL JS does.
Fixes #3296 , fixes #3297 .
2015-12-15 12:52:13 -08:00
Konstantin Käfer
2700ea87a4
[core] fix font rendering at the top edge of the viewport
2015-12-15 11:41:58 -08:00
Konstantin Käfer
4fc8226838
[core] allow changing the orientation
...
You can now change the orientation of north to be to the right, bottom, left in addition to the default of top
2015-12-15 11:41:58 -08:00
John Firebaugh
4a803f1a78
[core] Don't use glClear optimization for layers that aren't the bottommost
...
Fixes #3292
2015-12-14 17:01:16 -08:00
Konstantin Käfer
95cef66e22
[core] change RapidJSON usage to use CrtAllocator and bump GeoJSON VT
2015-12-14 16:43:35 -08:00
John Firebaugh
9b8f5d3be1
[core] Fix another place GL state was required but not set
2015-12-14 15:50:42 -08:00
Thiago Marcos P. Santos
9af7594d61
[core] Use global namespace on some <cmath> functions
...
Improves compatibility as some old std libs don't have them
on the std:: namespace.
2015-12-11 17:12:31 -08:00
Konstantin Käfer
8d711e9c80
[test] update test suite to include more comprehensive GeoJSON tests
2015-12-11 16:23:43 -08:00
Konstantin Käfer
c4a01d51ea
[core] don't fail on invalid inline GeoJSON data
2015-12-11 16:23:43 -08:00
Konstantin Käfer
0f9922cff5
[core] create GeoJSON tiles from inline GeoJSON in sources
2015-12-11 16:23:42 -08:00
Konstantin Käfer
2f973d0a7e
[core] parse GeoJSON source type
2015-12-11 16:23:42 -08:00
Konstantin Käfer
132b68e4fc
[core] split Source parsing into separate functions
2015-12-11 15:25:12 -08:00
Konstantin Käfer
2b9f20461a
[core] move SourceInfo to its own file
2015-12-11 15:25:12 -08:00
John Firebaugh
65b3220368
[core] Reduce custom layer API to lowest common denominator
2015-12-11 12:44:54 -08:00
Konstantin Käfer
93c000dd18
[core] viewport is handled by embedding applications
2015-12-10 14:16:11 -08:00