Commit Graph

7919 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
6c94898297 [Qt] Fix typo in QMapboxGL::resize 2016-06-01 15:52:00 +03:00
Bruno de Oliveira Abinader
31753583da [test] Added GL objects tests 2016-06-01 15:28:59 +03:00
Bruno de Oliveira Abinader
1b0683b94c [core] Use unique_resource for GL objects
Source: https://github.com/okdshin/unique_resource

These replace the complexity of manually handling moveable-RAII objects
with a type specific for that purpose.

As suggested in https://github.com/mapbox/mapbox-gl-native/pull/5141#issuecomment-221719872.
2016-06-01 13:53:39 +03:00
Bruno de Oliveira Abinader
2038a21cb5 [core] s/GLObjectStore/ObjectStore/ 2016-06-01 13:53:39 +03:00
Bruno de Oliveira Abinader
a3e0c60a7c [build] Added unique_resource as dependency 2016-06-01 13:53:39 +03:00
Bruno de Oliveira Abinader
f301df931c [build] Header-only deps should only need cflags 2016-06-01 13:52:11 +03:00
Bruno de Oliveira Abinader
59f9a9f93c [core] Update sdf shader code
Ported the following patch:
- [convert mat4 exMatrix to a vec2 extrudeScale](a8d549b7a4)
2016-06-01 11:18:43 +03:00
Bruno de Oliveira Abinader
5e7736ce87 [core] Update icon shader code
Ported the following patch:
- [convert mat4 exMatrix to a vec2 extrudeScale](a8d549b7a4)
2016-06-01 11:18:18 +03:00
Thiago Marcos P. Santos
64f4be635b [android] Fix x86_64 build
sysroot path not being passed to the compiler and linker
2016-06-01 00:46:28 +03:00
Young Hahn
a800d33dd8 [core] Don't earcut more than 500 inner rings 2016-05-31 10:15:18 -07:00
John Firebaugh
517218204f Remove libtess2 from LICENSE.md 2016-05-31 10:15:18 -07:00
John Firebaugh
a475f1d813 [core] Run fixupPolygons on geojson-vt-cpp polygon output 2016-05-31 10:15:18 -07:00
John Firebaugh
25eec28588 [core] Fix up v1 vector tile geometries with clipper 2016-05-31 10:15:18 -07:00
John Firebaugh
58a9ca8042 [core] Run fix_members.sh on clipper code
https://github.com/mapnik/clipper/blob/r496-mapnik/cpp/fix_members.sh
2016-05-31 10:15:18 -07:00
John Firebaugh
f2427c8066 [core] Re-add clipper from https://github.com/mapnik/clipper/blob/r496-mapnik
Revision ac8d6bf2517f46c05647b5c19cac113fb180ffb4
2016-05-31 10:15:18 -07:00
John Firebaugh
faaafb8387 [core] Replace clipper and libtess with earcut.hpp 2016-05-31 10:15:18 -07:00
Jesse Bounds
2ab782b30e [ios] Make turnstile send guard based off of calendar day (#5180)
This improves the turnstile send time guard so that instead of guarding
against sending a turnstile event once per 24 hours it guards using
a calendar day. This means that, all else being equal, a turnstile
can be sent once per day in the same session assuming there is a map
load event in that session. A turnstile will always be sent for a map
load at the start of a session.
2016-05-31 08:49:10 -07:00
Minh Nguyễn
c4e3f7c5ee [ios] Added MGLAnnotationView to jazzy TOC (#5185)
Added MGLAnnotationView to jazzy’s table of contents.
2016-05-31 08:26:28 -07:00
Bruno de Oliveira Abinader
cbfc84aff4 [core] Use init list for shader attributes
Shader parent object has been safely created, so it is safe to
initialize the *Shader attributes via initialization list.
2016-05-31 18:15:09 +03:00
Bruno de Oliveira Abinader
62b4dd554a [core] Update circle shader code
Ported the following patches:
 - [convert mat4 exMatrix to a vec2 extrudeScale](a8d549b7a4)
 - [Enabled data-driven styling for circle-radius](4356e41fa6)
 - [Reduce shader boilerplate, refactor "Bucket"](7d3da8f191)
2016-05-31 18:02:40 +03:00
Minh Nguyễn
b94a125ff2 [osx] Relegated “selection” to context menu
Moved feature selection to the context menu and restored the press gesture for dropping a pin. Bust complex features into simple shapes to feed into MGLMapView as overlays.
2016-05-27 21:42:39 -07:00
Minh Nguyễn
974e669698 [ios, osx] Ignore compound shape types as annotations
Ignore any multipolyline, multipolygon, or shape collection object passed into -addAnnotation: or -addAnnotations:. Previously, these methods broke apart the compound shape into its constituent shapes in order to recursively add them to the map. But that broke assumptions about a one-to-one correspondence between annotations and their contexts during selection and deletion.
2016-05-27 21:42:39 -07:00
Minh Nguyễn
bacf1f59ca [ios, osx] Cleaned up evaluators
Removed a level of indirection when creating Objective-C collections from C++ collections. Adopted mbgl typedefs for geometry.hpp types. Factored out MGLPolygon construction.
2016-05-27 21:42:39 -07:00
Minh Nguyễn
de905ab64c [ios, osx] Holes in polygons
MGLPolygon (and by extension MGLMultiPolygon) now supports interior rings. The data is preserved in feature querying results, and interior rings are respected when adding polygon overlays to the map.

Fixes #1729.

[ios, osx] Updated changelog
2016-05-27 21:42:38 -07:00
Minh Nguyễn
4ab98387f1 [ios, osx] MGLFeature tests 2016-05-27 21:42:38 -07:00
Minh Nguyễn
ff0cc1c9ef [ios, osx] Streamlined conversion to MGLFeature
Made writability of MGLFeature properties private, to avoid having to awkwardly explain that changes to the properties don’t change the map (maybe someday they will). This allows the identifier and attributes to be set in only one place, avoiding copy-pasta.
2016-05-27 21:42:38 -07:00
Minh Nguyễn
c6683ee1d3 [ios, osx] Feature querying; complex geometry classes
Added methods to MGLMapView that return the rendered features at a visible point or within a visible rectangle on the map, optionally restricted to a set of layers, plus voluminous documentation.

Added several new geometry classes corresponding to distinct geometry types supported by geometry.hpp. Added parallel “feature” classes to represent these geometries along with tags (IDs) and attributes (properties) from the source.

Grouped classes in the Foundation and SDK groups by theme.

In iosapp, dropped pins’ callout views now display the name of the topmost named feature at that point.

In osxapp, a long press on the map highlights the features under the cursor. Dropping a pin via the menu or context menu item shows the usual dropped pin, but the pin’s title is now the name of a feature under the cursor, if available, rather than “Dropped Pin”.

Fixes the iOS/OS X side of #352.
2016-05-27 21:42:31 -07:00
Jesse Bounds
c9520713ca [ios] Update telem domain and certs (#5181)
Change domain from api -> events
Replace old certs with new ones with the same name. The new certs
have an expiry that is further out.
2016-05-27 18:43:39 -07:00
Jesse Bounds
6ec9295ab5 [ios] Force update from display link when display link is created. (#5164)
This forces the call of the map view's display link target when the
display link is created. When a map view is shown the first time
this is not required. However, if the display link was torn down
and then recreated due to the map view being removed / obscured in the
view hierarchy the map view delegate may expect to be informed when
the map view did finish loading the map when it is shown again.

This adds a call to `updateFromDisplayLink` just after a display link
is created which helps trigger a full refresh of the map in the sense
that all delegate methods get exercised including
`mapViewDidFinishLoadingMap`.
2016-05-27 17:37:09 -07:00
Thiago Marcos P. Santos
9db75f1be3 [core] Fill the initial changeTimes with the reference timestamp of the first frame
On the Javascript implementation the array is automatically filled with
zeroes which is not the same thing as `TimePoint::min()`. Here we need
to get our own "zero" which is the timestamp of the first frame.

Fixes #5109
2016-05-27 23:30:12 +03:00
Jesse Bounds
5c9968b089 [ios] Update changelog for annotation view distance scaling. 2016-05-27 12:52:10 -07:00
Tobrun Van Nuland
78fe86fcb1 [android] #5106 - add check for destroyed map view for addMarker() 2016-05-27 11:43:59 -05:00
Minh Nguyễn
71caee2e49 [osx] Updated changelog for #5141
Same as 2f25c1ac43, but for OS X.
2016-05-27 09:30:30 -07:00
Jason Wray
2f25c1ac43 [ios] Update changelog for raster memory leak fix in #5141 2016-05-27 12:23:50 -04:00
Mike Morris
95f1804053 node-v3.1.3 2016-05-27 11:53:17 -04:00
Rob | Labs
c53a1a3dce [privacy] [android] Remove logging of location due to privacy leak.
* Location logs are not just kept on the device.
* Some logging packages, e.g.,
 Firebase, now has the option to upload logs to cloud.
* This closes a potential privacy leak.
2016-05-27 10:50:04 -05:00
Thiago Marcos P. Santos
5be5bab730 [Qt] Share the same RunLoop if in the same thread 2016-05-27 15:44:59 +03:00
Thiago Marcos P. Santos
d0561c5d6c [Qt] Assert that we run the async on the right loop 2016-05-27 15:44:59 +03:00
Tobrun Van Nuland
6cfee1db7c [android] #5113 - added javadoc to the MarkerView API 2016-05-27 14:12:01 +02:00
Tobrun Van Nuland
d54f951785 [android] #5113 - added javadoc for MarkerViewManager 2016-05-27 14:11:42 +02:00
Konstantin Käfer
1b8d280e3f [core] refactor updateRenderables algorithm 2016-05-27 10:15:06 +02:00
Konstantin Käfer
ebff2234e4 [core] remove unused template definition 2016-05-27 10:15:02 +02:00
Jesse Bounds
c90f51a1a9 [ios] Add annotation view scaling (#5085)
This adds an option to MGLAnnotationView so that a developer can control
how their annotation views scale in size as they approach the top of
the map view (along the Y axis). The size change is also affected by
the pitch (tilt) of the map view. If there is no tilt then scaling
is not performed. As the map is tilted scaling is gradually applied.

This turns the MGLAnnotationView implementation into an Objective C++
class so that SDK constants from C++ files can be used.

The new behavior is enabled by default to maintain consistency with
annotations backed by GL sprites. The MBXViewController redundantly
sets the new property as an illustration of use.
2016-05-26 23:10:02 -07:00
Minh Nguyễn
8ace0d37d1 [core] AnnotationTileLayer vends its own name (#5163)
Fixes #5159.
2016-05-26 13:12:23 -07:00
Konstantin Käfer
27f9a85fea [node] don't fire callback for canceled AsyncRequest 2016-05-26 20:17:36 +02:00
Bruno de Oliveira Abinader
c111250fcc [core] s/operator bool/created()/ in {GL,TexturePool}Holder
Prevents confusing usage of GL holder objects.
2016-05-26 19:36:52 +03:00
Bruno de Oliveira Abinader
b2b2797c2a [core] Move objectStore in {GL,TexturePool}Holder::reset()
Fixes an issue where a moved {GL,TexturePool}Holder would use an invalid
pointer when accessing 'objectStore'.

Fixes #5136.
2016-05-26 19:36:51 +03:00
Bruno de Oliveira Abinader
26a425fa6d [Qt] QMapboxGLPrivate::getPixelRatio() cleanup 2016-05-26 17:52:34 +03:00
Tore Halset
f3ec50da12 overide canBecomeFirstResponder to return YES to be able to use UIMenuController on the map (#5156) 2016-05-26 07:43:53 -07:00
Tobrun Van Nuland
af6ae05ca3 [android] #3629 - smooth animation for non location tracking 2016-05-26 15:55:01 +02:00