Commit Graph

267 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
c98f4f476b [core] Emit MapChangeDidFailLoadingMap when the style cannot be loaded or parsed
Currently this signal is never emitted, which can cause the Still mode
to starve in case of an invalid style or failed request.
2016-08-24 20:02:31 +03:00
John Firebaugh
86cccc4d24 [core] Don't allow style mutations to be overwritten by revalidation
* Once we get a fresh style, stop revalidating.
* If the style is mutated, stop revalidating and preserve the existing mutations.
2016-08-23 09:55:32 -07:00
Konstantin Käfer
cb33c861b4 [core] parse more Style JSON properties
We're now parsing "name", "center", "zoom", "bearing", and "pitch" from the stylesheet.
2016-08-19 17:34:10 +02:00
Minh Nguyễn
e147887e35 [core, android, ios, macos] Replaced getPointAnnotationsInBounds() w/ queryPointAnnotations() (#5165)
queryPointAnnotations() accepts a screen rectangle instead of a geographic bounding box, so marker hit testing works at the edges of a rotated, tilted map view.

Fixes #5151.
2016-08-12 15:45:18 -07:00
Minh Nguyễn
1cf6b5de0c Merge branch 'release-ios-v3.3.0' 2016-07-19 15:22:17 -07:00
Jason Wray
09221ecf1a [core] Guard against camera's minScale being NaN
Fixes a bug where calculating the padded bounds for a single point would cause division by zero, resulting in NaN for `minScale`. This invalid `minScale` would then be used to create an invalid padded `centerPixel`.
2016-07-15 12:20:56 -04:00
Konstantin Käfer
77e7846756 [core] code style cleanups
- puts function definitions in a namespace ... {} rather than using namespace ...;
- remove trailing whitespace
- add trailing newline
- protect SQL statements from being formatted by clang-format
2016-07-01 12:38:33 +02:00
John Firebaugh
8956179ce0 [core] Merge TexturePool into ObjectStore; pool all textures (#5477) 2016-06-27 13:44:46 -07:00
John Firebaugh
699076c2fa [core] Remove TexturePool from style::UpdateParameters (#5442) 2016-06-22 12:32:06 -07:00
Konstantin Käfer
d58ed6f9f3 [core] remove TexturePool dependency from Raster constructor 2016-06-22 16:28:32 +02:00
Bruno de Oliveira Abinader
97dffeb03d [core] s/Wireframe/Overdraw/g 2016-06-20 13:24:20 +03:00
Bruno de Oliveira Abinader
df5a395708 [core] Refactor wireframe to match JS overdraw mode 2016-06-20 13:24:20 +03:00
John Firebaugh
2921127bdb [core] Avoid unnecessary work when a symbol annotation is updated
In particular, if only the geometry changes, don't cascade and recalculate the style.
2016-06-17 11:38:04 -07:00
John Firebaugh
5254127e8c [core] Runtime source API: Map methods 2016-06-16 13:27:15 -07:00
John Firebaugh
1529116ef6 [core] Introduce Map::getLayer 2016-06-13 17:22:05 -07:00
Konstantin Käfer
8a8f828e41 [core] rename onPlacementRedone -> onNeedsRepaint 2016-06-10 12:42:14 +02:00
Brad Leege
d67b88dba9 Merge branch 'release-android-v4.1.0'
# Conflicts:
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerViewOptions.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerView.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerViewManager.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java
#	platform/android/src/jni.cpp
#	src/mbgl/geometry/buffer.hpp
#	src/mbgl/geometry/glyph_atlas.cpp
#	src/mbgl/geometry/glyph_atlas.hpp
#	src/mbgl/geometry/line_atlas.cpp
#	src/mbgl/geometry/vao.cpp
#	src/mbgl/gl/gl_object_store.cpp
#	src/mbgl/gl/gl_object_store.hpp
#	src/mbgl/renderer/frame_history.cpp
#	src/mbgl/shader/shader.cpp
#	src/mbgl/sprite/sprite_atlas.cpp
#	src/mbgl/sprite/sprite_atlas.hpp
#	src/mbgl/text/glyph_pbf.hpp
2016-06-09 14:00:49 -05:00
Thiago Marcos P. Santos
b711979e32 [android] #5254 - fix ARMv5 support
Backported patches fixing ARMv5 support for issue #3985.
2016-06-06 23:31:51 +03:00
Thiago Marcos P. Santos
313d9ce09c [core] log2 polyfill for ARMv5
ARMv5 doesn't have a FPU and apparently the soft code for log2()
is wrong and giving weird results. log() works, so we use a log()
based log2() implementation for ARMv5.
2016-06-06 22:19:25 +03:00
Konstantin Käfer
c3cbe67c01 [core] code style and remove unused code 2016-06-06 17:55:01 +02:00
Bruno de Oliveira Abinader
650b988874 [core] Perform GL object store cleanup on low memory 2016-06-03 11:03:16 +03:00
John Firebaugh
e802aedb8c [core, node, android] Remove used "base" parameter from setStyleJSON 2016-06-02 16:33:56 -07:00
John Firebaugh
c902f9098b [core] Rationalize naming for style-related code 2016-06-02 14:51:39 -07:00
John Firebaugh
d7e1ecd19e [core] Generalize Map::{add,remove}CustomLayer 2016-06-02 14:51:39 -07:00
John Firebaugh
a43940afb2 [core] Runtime style layer API 2016-06-02 14:51:39 -07:00
John Firebaugh
0fba70d5a8 [all] Rationalize annotation API 2016-06-01 17:37:01 -07:00
John Firebaugh
8985b1311b [core] Use geometry.hpp types for shape annotations 2016-06-01 17:36:50 -07:00
Bruno de Oliveira Abinader
2038a21cb5 [core] s/GLObjectStore/ObjectStore/ 2016-06-01 13:53:39 +03:00
Bruno de Oliveira Abinader
1769e6fcb4 [core] Move GLFW stencil clip debug to core
This makes the stencil clip debug available to all platforms.

Fixes #4669.
2016-05-24 19:58:24 +03:00
Konstantin Käfer
7272d7c84c [core] move *Observers to their own files 2016-05-23 18:04:31 +02:00
Bruno de Oliveira Abinader
7143408f69 [core] Implement MapDebugOptions::Wireframe
Together with MapDebugOptions::Collision, provides "wireframe" rendering
output so all drawn objects are visible. This mode ignores the line
width, background and fill colors for better visualization.

Fixes #4359.
2016-05-23 11:50:05 +03:00
Konstantin Käfer
002393bdea [core] remove MockView and View dependency in Transform 2016-05-18 12:07:21 +02:00
John Firebaugh
3e21e3887a [core] Introduce StyleQueryParameters; push coordinate calculations into Source 2016-05-17 13:20:25 -07:00
John Firebaugh
8ec0b70722 [core] Use mapbox::geometry::box in queryRenderedFeatures 2016-05-13 09:01:32 -07:00
Bruno de Oliveira Abinader
c13dd32242 [core] Added Viewport mode
Satisfies embedding platforms that requires the viewport coordinate
systems to be set according to its standards e.g. viewport mirrored
vertically.
2016-05-11 15:48:51 +03:00
John Firebaugh
9330d674a9 [core] Use geometry.hpp's point 2016-05-05 11:30:53 -07:00
Brent W
7e6995d153 [core] Merge pull request #4914 from bwhtmn/camera-padding
Fix a bug in applying padding to the camera.

Fixes #4862.
2016-05-04 01:28:27 -07:00
John Firebaugh
c8391729c7 [core] Use geometry.hpp feature type 2016-05-03 17:25:49 -07:00
Ansis Brammanis
61d14089e0 [core] implement queryRenderedFeatures 2016-04-29 12:00:24 -07:00
Minh Nguyễn
466ed55200 [core, ios, osx] cameraThatFitsCoordinateBounds
Added an API to get a camera that you can pass into -[MGLMapView setCamera:] that fits the given coordinate bounds, by analogy with -[MKMapView regionThatFits:] or -[MKMapView mapRectThatFits:edgePadding:].

Added mbgl::Map::getCameraOptions() for getting the current camera options more conveniently.
2016-04-22 16:39:25 -07:00
Thiago Marcos P. Santos
d51944fbea [core] Don't copy TransformState (#3501) 2016-04-15 12:17:19 -07:00
John Firebaugh
1ee0055710 [core] Eliminate MapData 2016-04-15 09:56:18 -07:00
John Firebaugh
9d18d65eda [core] Remove MapData dependency from Painter 2016-04-15 09:56:18 -07:00
John Firebaugh
ed489e7649 [core] Remove MapData dependency from Style 2016-04-15 09:56:18 -07:00
John Firebaugh
ce4270b01c [core] Convert MapContext to Map::Impl; eliminate indirection 2016-04-15 09:56:18 -07:00
John Firebaugh
204c7fee03 [core] Render from the main thread
Do not create a thread for the MapContext anymore.
2016-04-14 13:44:08 -07:00
Thiago Marcos P. Santos
2d580364a6 [core] Do the MapContext::cleanup() synchronously
This used to be async assuming the libuv behavior of holding the
main loop until all the messages are processed and also for avoiding
a deadlock at exit that no longer exits.

Now that we support multiple main loops implementation on different
platforms, we do the cleanup synchronously to make sure all the
platforms have the same behavior at exit.

Fixes #4631
2016-04-12 20:15:25 +03:00
John Firebaugh
5eda74a514 Merge branch 'release-ios-3.2.0-android-4.0.0' 2016-03-30 17:43:37 -07:00
John Firebaugh
7b5a1ca167 [core] Localize and simplify state for MapChangeDidFinishLoadingMap event
Only Map needs to track this state, and it can simply be set when beginning to load a style and reset when finished.
2016-03-30 13:53:31 -07:00
Bruno de Oliveira Abinader
cd1a06c2dc [core] Get rid of MapData::{get,set}animationTime 2016-03-18 01:27:48 +02:00