summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Revert WebP support due to broken builds"Bruno de Oliveira Abinader2016-01-201-0/+6
| | | | | | | This reverts commit 6709bdcacd5a45a10b554f3f225206c9494e5e43. There was an issue with the script that removes '-lwebp' from WebP linker flags, since we're statically linking. This is now fixed.
* [core][ios][osx][android] make SpriteImage accept PremultipliedImageAnsis Brammanis2016-01-198-43/+37
| | | | | | | | | | | | the SpriteImage constructor signature changes from SpriteImage( uint16_t width, uint16_t height, float pixelRatio, std::string&& data, bool sdf = false); to SpriteImage(PremultipliedImage&&, float pixelRatio, bool sdf = false)
* [core][ios][osx][android] fix icons with non-integer width/heightAnsis Brammanis2016-01-192-21/+14
| | | | | | | | | | | ref #3031 ref #2198 For example, an icon that has: - a pixel width of 10 - a pixel ratio of 3 - a scaled with of 3.333 is now supported.
* [core] Use experimental optional instead of mapbox::util::optionalJohn Firebaugh2016-01-1926-64/+59
|
* Revert WebP support due to broken buildsJohn Firebaugh2016-01-191-6/+0
| | | | This reverts commits 2010fbb0e61cbe7c0b08560118ca887fc1d7193e, a361ce47a19d37b96b48cd605c62c5ab79bba462, and d004bb275ae3ea60bb6c2febd6fa22f1f51c3993.
* [linux] Replace PNG with WebP on tile source URLBruno de Oliveira Abinader2016-01-191-0/+6
| | | | | This is a hack, in the same fashion as adding {ratio} to the tile URLs. We should update the raster tile sources to use WebP by default.
* [ios] Flip points, not edge insetsMinh Nguyễn2016-01-182-12/+7
|
* [core] Reformulated setLatLng() based on CameraOptionsMinh Nguyễn2016-01-181-15/+11
| | | | This version of setLatLng() can be expressed by constraining the viewport to a 0×0 viewport around the passed-in point.
* [core, ios, osx, android, glfw] Flipped origin of Map::latLngForPixel(), ↵Minh Nguyễn2016-01-183-4/+26
| | | | | | | | Map::pixelForLatLng() Map and Transform methods assume an origin at the top-left corner of the view, like iOS, Android, and GLFW but unlike OS X. Transform is responsible for flipping coordinates between the top-left origin of Map and the bottom-left origin of TransformState. Fixes #3574.
* [core, osx] Added optional padding to convenience methodsMinh Nguyễn2016-01-183-18/+73
| | | | Methods that offer a convenient way to jump or ease now accept an optional padding parameter. MGLMapView specifies the padding to ensure that keyboard-based zooming and rotation respects the toolbar.
* [core] Added padding option to CameraOptionsMinh Nguyễn2016-01-184-8/+61
| | | | | | Moved EdgeInsets to geo.hpp so CameraOptions and Transform can refer to it. Added a padding option to CameraOptions that alters the frame of reference for the center option. Added optional padding parameters to LatLng getters and setters. Working towards #2600.
* [core] Add missing returns in error caseJohn Firebaugh2016-01-151-0/+2
| | | | Fixes #3585
* [core] tileSize is a source property, not a TileJSON propertyJohn Firebaugh2016-01-155-6/+21
|
* [core] use stale glyphsKonstantin Käfer2016-01-153-29/+31
| | | | Updating glyphs is still unsupported, and there's no good use case for doing so. When we're using a stale glyph PBF, and the fresh answer contains changed to that glyph, we will continue to use the old glyph.
* [core] don't store error stateKonstantin Käfer2016-01-158-36/+35
| | | | Previously, we could first get a stale response from cache, then immediately a "connection error" response that overwrote the error state variable. In the tileLoadingCompleteCallback, we'd only see the second overwritten error state and abort. This could lead to the map sometimes not being rendered at all until the user interacts with the map.
* [core] use stale sprite dataKonstantin Käfer2016-01-151-14/+16
| | | | This is a naïve implementation that essentially merges updated data into existing data. It will *not* remove icons from the stale sprite if they aren't present in the fresh sprite (we aren't tracking the source of a sprite, and the user could have changed it as well). Similarly, it will not update icons that have changed in dimension. This is a rare edge case and probably not worth implementing.
* [core] abort current parse when we get a new NotFound responseKonstantin Käfer2016-01-151-0/+1
|
* [core] update the modified/expires debug info for unmodified responses as wellKonstantin Käfer2016-01-152-6/+6
|
* [core] use stale raster tilesKonstantin Käfer2016-01-151-7/+11
|
* [core] don't mark tiles with failed requests as obsoleteKonstantin Käfer2016-01-153-2/+10
| | | | Otherwise, this will remove them from the map and overwrite the old data. This could happen e.g. when we have connection trouble and a tile needs to be refreshed, or we're displaying stale information and the connection is down.
* [core] use stale and refreshing TileJSON/GeoJSON dataKonstantin Käfer2016-01-151-5/+34
| | | | We're now supporting using stale TileJSON and GeoJSON data. When we receive a new answer with an updated TileJSON file, we're replacing the Source's metadata with the new one and trigger updates to make sure we're loading the correct tiles. Similarly, GeoJSON data will be reparsed.
* [core] use stale stylesKonstantin Käfer2016-01-152-9/+9
| | | | This adds support for using cached styles that are stale. They're treated like changing styles; when the refreshed style changed compared to the one we've already had, we're swapping out the entire style, which might cause a slight flicker.
* [core] Support multiple paths in SQLiteCache::getShared()Konstantin Käfer2016-01-151-1/+0
| | | | If you use many different caches, expired weak_ptrs will pile up in the unordered_map, but that is an edge case, and you probably shouldn't do that anyway.
* [core] move SharedSQLiteCache::get to SQLiteCache::getSharedKonstantin Käfer2016-01-151-9/+2
|
* [core] place symbol layers in correct orderAnsis Brammanis2016-01-149-37/+51
| | | | | | | | | | Previously, the placement of symbols depended on the order in which the glyphs they need were loaded. The placement order should be based on the style. To fix this, symbol layers are placed in `placementPending` after they are parsed. After all layers are parsed, symbol layers (stored in `placementPending`) are placed and returned.
* [core] Let SQLiteCache decide when store or refresh responsesJohn Firebaugh2016-01-141-2/+1
|
* [core] Use notModified rather than storing the previous response bodyJohn Firebaugh2016-01-142-4/+2
|
* [core] Add an explicit "not modified" indicator to ResponseJohn Firebaugh2016-01-141-0/+1
|
* [core] std::shared_ptr<const Response> ⇢ const Response&John Firebaugh2016-01-141-1/+1
|
* [core] Eliminate FileCache interfaceJohn Firebaugh2016-01-142-7/+15
| | | | There is only one implementation and we're unlikely to add more.
* [core] Fix crash on transitionFrameFn callbackThiago Marcos P. Santos2016-01-141-1/+4
| | | | | | | | | | | | | | | | | | | This is a tricky one: We are storing a lambda at the member variable `transitionFrameFn` and capturing `this` at this lambda function. At some point when running the callback, we set `transitionFrameFn` to `nullptr`, effectively destroying the callback that is being executed. After this point, `this` is no longer valid, as the memory gets cleared and it might point to the correct location (or not). That is why it works on some compilers but not on g++ 5.3.1. Touching any `this->[smth]` is undefined after that. The fix is just move `transitionFrameFn = nullptr` to the last thing we do on the callback. This behaves similarly to calling `delete this` on a class method.
* [core] Fixed build error in Xcode 7.3Minh Nguyễn2016-01-141-1/+1
| | | | Removed std::move() call per Xcode fix-it suggestion.
* [core] Consolidated easeTo and flyToMinh Nguyễn2016-01-142-163/+126
| | | | Pushed much of easeTo() and flyTo() into startTransition() to avoid code duplication.
* [core] Moved camera methods next to each otherMinh Nguyễn2016-01-142-96/+104
|
* [core] Consolidated zoom and angle anchor logicMinh Nguyễn2016-01-144-35/+61
| | | | Made anchor a CameraOption for easeTo().
* [core] Standardize transform originMinh Nguyễn2016-01-143-44/+58
| | | | All Transform methods that take a PrecisionPoint now assume a “flipped” origin at the upper-left corner of the view. Previously, some methods assumed an origin at the lower-left corner.
* [core] Cleaned up TransformMinh Nguyễn2016-01-144-176/+143
| | | | | | Eliminated many redundant methods on Transform. Minimized usage of TransformState::x and TransformState::y. Added convenient constructors for AnimationOptions. When scaling, passing in view’s origin as the anchor no longer anchors the scaling operation at the view’s center. To specify no anchor, use NaN. Increased precision of worldSize(), now that it’s used much more heavily in transform methods.
* [core] Separated AnimationOptions from CameraOptionsMinh Nguyễn2016-01-143-88/+81
|
* [core] fix overscaled line patterns and re-enable render testsAnsis Brammanis2016-01-131-2/+2
| | | | | fix #3489 fix #2648
* [core] set u_texture uniform valueAnsis Brammanis2016-01-133-0/+4
| | | | fix #1685
* [core] remove bilinear, nearest scaling, fix #3164Ansis Brammanis2016-01-134-182/+32
|
* [core] match icon rendering with -jsAnsis Brammanis2016-01-138-35/+45
| | | | port https://github.com/mapbox/mapbox-gl-js/pull/1919/files
* [core] Simplify asset:// implementationJohn Firebaugh2016-01-134-30/+26
| | | | | | | | * Move asset:// URL handling to DefaultFileSource. * AssetFileSource implements FileSource interface and follows familiar implementation patterns. * Move default implementation to platform/default, zip implementation to platform/android. * Don't bother with modified / expires / etag -- assets are not cached so it doesn't matter. * Don't bother with interleaving individual IO calls on the implementation thread. That adds a lot of complexity for very little benefit.
* [core] move SourceInfo parsing to StyleParserKonstantin Käfer2016-01-136-210/+200
|
* [core] move invariant Source ID from SourceInfo to SourceKonstantin Käfer2016-01-136-13/+12
|
* [core] rename "id" to "tileID" to avoid naming conflictsKonstantin Käfer2016-01-132-42/+40
|
* [core] move invariant SourceType from SourceInfo to SourceKonstantin Käfer2016-01-135-26/+22
|
* [core] move raster tile URL normalization to source parsingKonstantin Käfer2016-01-133-6/+10
|
* [core] remove SourceInfo dependency from *TileDataKonstantin Käfer2016-01-139-51/+43
|
* [core] seamless fill-patternkelvinabrokwa2016-01-123-3/+28
| | | | | | seamless across dateline upgrade test-suite version