Commit Graph

133 Commits

Author SHA1 Message Date
Ivo van Dongen
71c71e43e6 [android] offline - prevent OOME 2016-09-23 10:47:54 +02:00
Ivo van Dongen
e968f4ed55 [android] timer - prevent overflow in due time 2016-09-23 10:47:54 +02:00
Ivo van Dongen
742d6d8275 [android] set connectivity state pro-actively 2016-09-23 10:47:54 +02:00
Young Hahn
6a2ce352d1 Better handling for undefined icon|text-rotation-alignment (#6253)
* [core, ios, android] Use `auto` value for properties with calculated defaults

* Fix render tests
2016-09-21 16:07:33 -07:00
Ivo van Dongen
eb97dbe383 [android] Sources: peer model, mutability (#6054) 2016-09-21 11:04:32 +02:00
Tobrun
9ef65440b6 [core] [android] - public api configurable base endpoint (#6309)
add runloop to test
2016-09-15 22:01:09 -07:00
Ivo van Dongen
ed4e37ba9f [android] HttpFileSource - rate limit 2016-09-13 14:21:38 +02:00
John Firebaugh
030234c7a6 [core] Rework invokeWithCallback so that the callback is last 2016-09-08 16:36:47 -07:00
John Firebaugh
8edf995946 [android] Remove declaration of deleted method (#6276) 2016-09-07 08:42:19 -07:00
John Firebaugh
fe2a26225f [core, ios, android, qt] Observe style layer mutations rather than requiring SDKs to use Map::update
This paves the way for updates to filter and layout properties to trigger a source reload, without each SDK having to participate in the implementation.
2016-09-06 14:29:22 -07:00
Ivo van Dongen
e1a2ee733c [android] jni - fix boolean to JsonPrimitive conversion (#6256) 2016-09-06 17:58:28 +02:00
Tobrun
8deb7aaa79 [android] - 5844 remove stop gap for update-able shape annotations (#6187)
* [android] - remove stopgap updatable shape annotations
2016-08-29 17:43:32 +02:00
Ivo van Dongen
4e211548d5 [android] #5869 - visible feature querying 2016-08-16 11:38:30 +02:00
Ivo van Dongen
ddf0d25845 [android] #5978 - fix number property filters [ci skip] 2016-08-12 18:47:05 -04: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
Ivo van Dongen
d9145f504b [android] #5887 - Custom layer crash fix + updated test case 2016-08-08 11:33:31 -04:00
Ivo van Dongen
5ac95b9dcf [android] #5885 - fix invalid jobject error and some build system updates 2016-08-08 08:54:58 -04:00
Thiago Marcos P. Santos
0c460a5590 [android] Refcount the view activations
Fixes #5836
Fixes #5721
2016-08-06 12:58:59 -04:00
Tobrun Van Nuland
6016b2981e [android] SurfaceView compatible snapshot api
[android] #5587 - snapshot API on surface view, create Bitmap with a ByteBuffer

[android] #5587 - write bitmap to external storage

PreMultipliedImage approach

callback implemented

clean up code

introduce bitmap reuse

cleanup

renaming surfaceContent to bitmap
2016-08-03 14:55:45 -04:00
Tobrun
f26c89c0b6 [android] #5663 - make shape annotations updateable 2016-08-03 14:50:41 -04:00
Ivo van Dongen
10b2cc60a7 [android] #5610 - Runtime style api - part 2 2016-08-02 16:58:03 -04:00
Ivo van Dongen
9a3eadfd5b [android] #5610 - Initial Runtime Style Bindings
[android] #5610 - Adjusted public api after discussion

[android] #5610 - added jni binding for NativeMapView#getLayer

[android] #5610 - Added initial test Activity

[android] #5610 - Started on NativePeer implementation for Layer

[android] #5610 - replaced low-level jni code with high-level for native getLayer

[android] 5610 - completed basic layer peer class - constructible from java and c++

[android] #5610 - removed reference that was redundant and causing the finalizer exception

[android] #5610 - Added a property peer

[android] #5610 - added value type to do type conversions - wip

[android] #5610 - simplified property conversion approach - wrapped value with jenv

[android] #5610 - added some more value conversions

[android] #5610 - Finished conversion for basic types

[android] #5610 - allow color's to be set as either an android color int or a String to support all formats in the spec

[android] #5610 - encode color ints as rgba to retain alpha channel

[android] #5610 - recalculate classes after paint property

[android] #5610 - more examples

[android] #5610 - fixed the example

[android] #5610 - cleaned up example code before continueing

[android] #5610 - added layout property example

[android] #5610 - set visibility on layer

[android] #5610 - added removeLayer and example

[android] #5610 - added more type conversions

[android] #5610 - Started on peer classes for layer implementations - WIP

[android] #5610 - First complete layer subclass peer implementation

[android] #5610 - added a little bit of structure before adding the other layer types

[android] #5610 - generate the c++ headers from the style spec

[android] #5610 - make sure the visibility is set as a string

[android] #5610 - Generate c++ layer peer class implementations from the style spec

[android] #5610 - generate java layer peer classes

[android] #5610 - cleanup comments

[android] #5610 - register all c++ peer classes with jni

[android] #5610 - addLayer

[android] #5610 - comment out broken case

[android] #5610 - Sources api - very much WIP

[android] 5610 - GeoJson source implementation and geojson conversion

[android] #5610 - cleanup add source/layer example a bit

[android] #5610 - initial filter api

[android] #5610 - Added filter api on the relevant Layer classes

[android] #5610 - raster layer is not filterable

[android] #5610 - actually make it compile

[android] #5610 - completed filter implementation

[android] #5610 - Vector and Raster Source + examples

[android] #5610 - removed superfluous interface, moved filters to the correct package

[android] #5610 - fixed comments

[android] #5610 - moved tests to the right package

[android] #5610 - hide difference between paint and layout properties in public api, make more performant set method for proeprties

[android] #5610 - fix rebase issue
2016-07-26 16:29:26 -04:00
Antonio Zugaldia
bdc231db94 [android] Create a new local reference frame in JNI listOfflineRegions
Fixes #5629
2016-07-25 13:19:46 -04:00
Bharath MG
e16c906bbf [android] fixes #5762. Passing pixel points to native jni for getting latlng. 2016-07-24 04:07:49 +05:30
Thiago Marcos P. Santos
d52faadf73 [android] Set thread name properly 2016-07-16 10:38:42 +03:00
Thiago Marcos P. Santos
538814d7bd [core] Make the AssetFileSource thread low priority 2016-07-16 10:38:42 +03:00
Thiago Marcos P. Santos
389c7615eb [core] Revert workaround for std::atomic on ARMv5
Got fix on r12.

https://github.com/android-ndk/ndk/issues/31
2016-07-13 17:56:51 +03:00
Bruno de Oliveira Abinader
761c9d44b2 [android] Update {Line,Fill}Annotation properties setter 2016-07-13 11:57:09 +03:00
Thiago Marcos P. Santos
480e26c53f [android] Add support for timers on the main thread
Wake up the main thread run loop with a file descriptor event from a
thread that exists for this sole purpose.
2016-07-06 17:43:19 +03:00
Thiago Marcos P. Santos
2425cf4ef8 Revert "[android] Do not create Timers on Default main loops"
This reverts commit 13cd75f099.
2016-07-06 17:43:09 +03:00
Thiago Marcos P. Santos
dfd0b105cd [android] Fix issue when stop is called before run on the RunLoop
The current ::stop() implementation was not thread safe and we
should queue the ::stop() for the next loop iteration so even
if we call ::stop() before ::run(), it gets processed.
2016-07-05 21:04:27 +03:00
Thiago Marcos P. Santos
13cd75f099 [android] Do not create Timers on Default main loops
Not supported, because we don't have control over the Looper
timeout like we do for Loopers we create. On the main thread,
Android takes care of making the application sleep and sets
an arbitrary timeout. This could be properly fixed by implementing
timers in Java, but we don't really have the use case of timers
in the main thread.
2016-07-05 21:04:27 +03:00
Thiago Marcos P. Santos
b3b86f9be4 [android] Fix hang when calling Timer::start() twice
Calling start() from the callback was making the timer
effectively stop.
2016-07-05 21:04:27 +03:00
Thiago Marcos P. Santos
e579199ac1 [android] Fix a bug when canceling tasks
If the next task in the queue gets canceled, we need to
adjust the iterator to the next task, otherwise a canceled
task gets executed.
2016-07-05 21:04:27 +03:00
Thiago Marcos P. Santos
70d4ebb347 [android] Fix default RunLoop not stopping
stop() for default RunLoop is only used by unit tests and we need
to wake the ALooper to get past run().
2016-07-05 21:04:27 +03:00
Tobrun
2bf4e20052 [android] #5104 - make nativePixelForLatLng faster (74ms to 57ms)
[android] #5104 - make nativeLatLngForPix faster (52ms - 45ms).

[andriod] #5104 - make nativeSetLatLng faster (117ms to 105ms)

[android] #5104 - make nativeFlyTo faster (106ms to 97ms)

[android] #5104 - make nativeEaseTo faster (103 to 94ms)

[android] #5104 - make nativeJumpTo faster (94 to 86ms)

[android] #5104 - make nativeProjectedMetersForLatLng faster (32 to 30ms)

[android] #5104 - make nativeLatLngForProjectedMeters faster (32 to 30ms)
2016-07-05 15:43:19 +02:00
John Firebaugh
3ccda59099 [android] Fix crash adding line or polygon annotation 2016-06-24 12:21:44 -07:00
Bruno de Oliveira Abinader
22aa22c99c [core] UnitBezier ctor is now constexpr 2016-06-20 13:01:59 +03:00
Young Hahn
24b66bc8cd Color class (#5361)
* Color class

* Switch to list initialization
2016-06-15 11:38:22 -04:00
Brad Leege
511801c17a [android] #5303 - Updating code to take properly merge what each branch intended for nativeUpdateMarker 2016-06-09 17:01:23 -05:00
Brad Leege
b90571107d [android] #5291 - Fixing merge conflicts 2016-06-09 14:35:10 -05: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
Tobrun
0a646b4487 [android] #5076 - fixed update marker for MarkerView, rewrite update marker jni, cleanup animation api 2016-06-06 11:13:40 +02: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
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
John Firebaugh
efaf6461aa [android] Basic cleanups in annotation JNI code 2016-06-01 17:36:50 -07:00