John Firebaugh
9331acf8e6
Add typedefs for std::chrono::steady_clock types
2015-04-02 12:28:12 +02:00
Konstantin Käfer
c475284a58
use hashes instead of string keys
2015-04-01 17:56:51 +02:00
Konstantin Käfer
220ebf61dd
replace iterator variable types with auto
2015-04-01 16:42:42 +02:00
Justin R. Miller
a8833c34d4
fixes #892 : support mapbox:// style URLs
2015-03-30 15:33:02 -07:00
Ansis Brammanis
14e8b4bb09
support wrapped bilinear scaling
...
to get rid of seams in repeating patterns.
https://github.com/mapbox/mapbox-gl-styles/issues/50#issuecomment-86159351
2015-03-26 10:45:23 +01:00
Justin R. Miller
486a385f98
Merge branch 'master' into 1022-annotations-thread-safety
2015-03-23 11:13:51 -07:00
Konstantin Käfer
61fa436193
coalesce buffer deletions and run them in bulk during rendering
...
On iOS, the main thread does framebuffer operations just before it requests a rerender of the view contents. This means that GL operations on the Map thread will interfere with that and cause a crash. While most GL operations happen throughout rendering (which is synchronized with the main thread), deletion of shared_ptrs release in turn their OpenGL objects. This may happen at any time and isn't synced with rendering.
This patch changes this so instead of deleting all objects immediately, we are collecting all abandoned IDs and delete them in bulk once the main thread has given us permission to use OpenGL calls (i.e. during render()).
2015-03-20 19:47:54 +01:00
Konstantin Käfer
f73dfc73f1
make more things const and refs, and add mutexes
2015-03-20 13:14:00 +01:00
Justin R. Miller
e049ce6df1
refs #893 #992 : point annotations API
2015-03-17 17:30:24 -07:00
Konstantin Käfer
48c55af5c1
fix sprites for pixel ratios that are not 1 and 2
...
- OpenGL ES 2 doesn't allow NPOT textures with wrap-around
- The Sprite object reported the map's pixelRatio, even though it loaded @2x assets
- Copying icons from the sprite into the atlas now uses bilinear scaling to scale up to the actual size
2015-03-17 12:30:40 +01:00
Thiago Marcos P. Santos
124b49562d
Get rid of printf and cout by using Log::*
...
Use our logging system that will route the message accordingly on
the target platform.
Fixes #613
2015-03-12 14:19:32 +02:00
John Firebaugh
50b5c15653
Rework GeometryTile* interface
2015-03-09 18:32:08 -07:00
John Firebaugh
a5998dc59b
Fix conditional in normalizeSourceURL
...
The existing conditional would always be false, since it
was comparing a url that begins with "mapbox://". In fact
no conditional is necessary; the secure TileJSON resource
should always be requested.
2015-03-06 18:16:58 -08:00
Minh Nguyễn
cd83c48ed3
Insert {ratio} before extension, not inside access token
...
Fixes #959 .
2015-03-06 15:33:14 -08:00
Minh Nguyễn
8804c47d27
Only add {ratio} to raster tile URLs
...
Thanks to @mb12 for the suggestion.
2015-03-06 13:51:20 -08:00
Minh Nguyễn
a6c8a76694
Replace regex usage with basic string manipulation
...
Apparently we can’t rely on the existence of <regex> yet.
Fixes #919 .
2015-03-06 13:51:19 -08:00
Minh Nguyễn
41c01373d5
Load 2× raster tiles on HiDPI screens
...
Based on mapbox.normalizeTileURL() in mapbox/mapbox-gl-js, but insert a “{ratio}” placeholder instead of “@2x” in order to keep the pixelRatio logic in TileData::request().
Fixes #919 .
2015-03-06 13:51:19 -08:00
Konstantin Käfer
2075d6bb9a
fix ambiguous name (gcc)
2015-03-06 16:09:14 +01:00
Konstantin Käfer
cf235c6592
move readlock/writelock to uv.hpp and add movable lock/mutex
2015-03-06 15:42:33 +01:00
Justin R. Miller
6e41664cb0
fixes #476 & #853 : pixel/meter/latlng conversion routines in core & iOS
2015-02-16 09:52:36 -08:00
Leith Bade
acfeda9899
Fix #include <uv.h> mixing between C and C++ modes
2015-02-11 19:01:30 -08:00
Ansis Brammanis
f99bd1c6ec
switch to functions of arrays (from arrays of fns)
...
for properties like *-translate, *-offset
https://github.com/mapbox/mapbox-gl-style-spec/issues/237
2015-02-05 17:30:34 -08:00
Ansis Brammanis
3a8aaad6a7
make everything a function
2015-02-05 16:46:13 -08:00
Konstantin Käfer
704b3719f5
use standard DEBUG macro rather than NDEBUG
2015-02-04 10:49:07 +01:00
Konstantin Käfer
272fa8935e
make storage lib separate so we can build without storage libs
2015-02-04 10:49:07 +01:00
Konstantin Käfer
1c91f09fda
move merge_lines implementation to its own source files to avoid duplicate symbols
2015-02-04 10:49:07 +01:00
Konstantin Käfer
b9bf66e67e
rewrite storage layer to be independent of the Map's event loop
2015-02-04 10:46:37 +01:00
Leith Bade
89bbd29278
Use std::chrono
2015-02-04 09:39:25 +11:00
Ansis Brammanis
793985580d
fix sprite atlas padding and icon centering
...
Pad each icon with one pixel on the bottom and right sides.
On top of this, extra padding is added to round the widths and heights
to multiples of four.
This then fixes the positions of the bottom and right vertices to
correctly center the icon's box around the center of the icon, not the
center of the padded icon.
js: 32ca4007699d1d21ab25bb38588b151510194030
fixes https://github.com/mapbox/mapbox-gl-js/issues/947
2015-01-27 19:15:22 -08:00
John Firebaugh
a8b6e3dc71
Merge remote-tracking branch 'origin/dash-3' into v7
2015-01-22 13:06:30 -08:00
John Firebaugh
8e23e3a3e8
Remove support for prerendered layers
...
https://github.com/mapbox/mapbox-gl-style-spec/issues/232
2015-01-21 18:41:17 -08:00
Ansis Brammanis
200b1ce449
remove names to suppress unused warnings
2015-01-16 14:40:30 -05:00
Ansis Brammanis
c472528f9b
support functions of dash arrays
2015-01-15 17:41:55 -05:00
John Firebaugh
c6ca57045f
Merge pull request #744 from mapbox/merge-roads
...
merge adjacent roads with the same text for labeling
2015-01-14 10:12:45 -08:00
Ansis Brammanis
b54c0e2447
simplify erase
...
so you don't have to think about whether find might return an end()
iterator (which is invalid for erase).
2015-01-13 22:26:37 -05:00
John Firebaugh
bac75f1c7a
Allow characters outside \w to be used in token
...
https://github.com/mapbox/mapbox-gl-js/pull/926
2015-01-12 10:17:01 -08:00
Ansis Brammanis
5670fb397f
get rid of separate vector for symbol geometries
2015-01-12 12:33:24 -05:00
Ansis Brammanis
e4858b6a02
merge adjacent roads with same text for labelling
...
js: https://github.com/mapbox/mapbox-gl-js/pull/683
2015-01-08 23:44:11 -05:00
Konstantin Käfer
93d56294cf
update error reporting function
2014-12-10 13:21:08 +01:00
Leith Bade
0808485453
Use CHECK_ERROR on every GL call
2014-12-10 21:57:34 +11:00
Konstantin Käfer
917c0168ab
don't include the source file in every library
2014-12-09 14:14:11 +01:00
Konstantin Käfer
e11c073e51
report version number in user agent string
...
refs #628
2014-12-08 16:21:15 +01:00
Konstantin Käfer
1f91be988b
add user agent header
...
fixes #628
2014-12-08 11:04:08 +01:00
Konstantin Käfer
3b190ddd0d
fix build
2014-12-04 20:13:08 +01:00
Konstantin Käfer
abafb52f37
make most headers private
2014-12-04 20:02:50 +01:00