Commit Graph

1261 Commits

Author SHA1 Message Date
Minh Nguyễn
c054441071 Fixed linker warnings about overridden styleURL__
Replaced #3088 with a better fix that relies on Interface Builder’s lack of support for conditional compilation.
2015-11-20 21:51:24 -08:00
Minh Nguyễn
06d400fb9a Discourage code usage of styleURL__ property
A hack atop the hack added in #2632. Pre-declare `styleURL__` with an attribute that prevents it from appearing in code completion suggestions, while leaving it available to Interface Builder, which is unable to parse attributes.
2015-11-20 12:03:16 -08:00
Minh Nguyễn
b791d1fb81 [iOS] Added missing documentation comment 2015-11-20 11:24:43 -08:00
Jason Wray
3aa523c7b1 [ios] document willStart/didFinish map loading delegate methods
Fixes #2706
2015-11-18 15:59:48 -08:00
Justin R. Miller
c4694df375 more clearly indicate Foundation imports to avoid recursion 2015-11-17 17:11:08 -08:00
Justin R. Miller
98462d4af8 add IB additions to umbrella header to avoid framework warnings 2015-11-17 14:43:58 -08:00
John Firebaugh
1e350b7ea4 [core] Reorganize sprite related files 2015-11-12 13:03:14 -08:00
Bruno de Oliveira Abinader
8b76f00d8c [core] PrecisionPoint is now a vec2<double>
We could reuse all the operators defined in vec2<>, including operator
bool() that checks if the contained values are !NaN.
2015-11-12 10:46:50 -08:00
Bruno de Oliveira Abinader
e31c96d885 [core] Fix mbgl::projection function signatures 2015-11-11 17:23:10 +02:00
Bruno de Oliveira Abinader
aa8857643d [core] Added MetersBounds 2015-11-11 16:59:49 +02:00
Bruno de Oliveira Abinader
5a24ac605b [core] Use PrecisionPoint in zoom and angle functions 2015-11-11 16:59:49 +02:00
Bruno de Oliveira Abinader
99ac8d8720 [core] Use pass-by-ref in CameraOptions
Pass-by-const-ref is not always possible because CameraOptions gets its
members modified along the way.

Also fixes a case in Map::jumpTo where Update::Zoom should be called if
zoom is affected.
2015-11-11 16:59:49 +02:00
Bruno de Oliveira Abinader
c78e769635 [core] Use PrecisionPoint in coordinate functions 2015-11-11 16:59:49 +02:00
Bruno de Oliveira Abinader
e2052ea3e4 [core] Added PrecisionPoint to represent pixel points 2015-11-11 16:59:49 +02:00
Bruno de Oliveira Abinader
e5c460f2db [core] Added isValid to geo helper structs 2015-11-11 16:59:49 +02:00
John Firebaugh
54e08b1f83 [core] Eliminate use of ClassProperties for paint 2015-11-10 11:33:17 -08:00
John Firebaugh
a562567589 [core] Eliminate use of ClassProperties for layout 2015-11-10 11:33:17 -08:00
Bruno de Oliveira Abinader
41120774af [core] Expose default fade duration to Map API 2015-11-10 10:28:16 +02:00
Konstantin Käfer
4d5c6333be [core] move retry logic to DefaultFileSource 2015-11-02 17:24:40 +01:00
Minh Nguyễn
557b8afb7c [core][iOS] Source iOS styles from default_styles
Moved mbgl::util::default_styles to a more appropriate location, where iOS platform code can also find it. Moved -[MGLMapView bundledStyleURLs] (which is now deprecated) and the style switcher in iosapp to default_styles.

Added a collection of convenience methods for getting style URLs. It makes little sense to layer an enum atop this, as MapKit does, because MGLMapView styles aren’t limited to this set. A good analogy is UIColor. This also makes for a good entry point for future runtime styling APIs.

Introduced independent constants for each default style, because it’s more common to need access to a particular style than to iterate over them. This fact is apparent in the MGLStyle class, which now uses macros and assertions to ensure that it’s kept up-to-date with changes in default_styles.

/ref #1462
2015-10-30 13:09:37 -07:00
John Firebaugh
014b517820 [node] Output debug logs when a render test times out 2015-10-28 15:54:34 -07:00
Ansis Brammanis
750c72f324 improve gestures in perspective view
The location under your finger stays under your finger as you pan.
The location you double tap to zoom stays at the same point.
The location at the center of a pinch zoom stays at the center.
The location at the center of a rotation stays at the center.
2015-10-26 12:48:03 -07:00
Konstantin Käfer
c0c554e36f [core] reparse tiles when new data arrives
We're now reparsing tiles when they expire. We're also swapping out buckets atomically to avoid flickering data; i.e. we're displaying the old data as long as we don't have a new parsed bucket for that layer yet. The parsed buckets now live in the *TileData objects rather than in the TileWorker; only partially parsed == pending buckets will remain in the TileWorker. Once they're parsed, they're moved to the *TileData object.
2015-10-26 15:54:27 +01:00
Konstantin Käfer
5173bf1bb8 [core] Make response data shared to avoid excessive copying 2015-10-26 15:54:27 +01:00
Konstantin Käfer
4e3503ea6c [core] do not use std::atomic_* with shared_ptrs
It's not implemented in GCC 4.9.2's stdlib (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57250). Instead, we're now always using a mutex to protect access; we previously created a mutex only on cancelation, but since we're always canceling now, it makes sense to allocate it right away.
2015-10-26 15:54:27 +01:00
Konstantin Käfer
6a7334b882 [core] add support for stale responses
We're now returning stale responses from cache. Those responses will have the `stale` flag set to true. Currently, all requesters in the core code discard stale responses, and cancel the request immediately after they got a non-stale response.
2015-10-26 15:54:27 +01:00
Minh Nguyễn
1e9cf71b5a IB inspectable for allowing tilt 2015-10-23 10:09:27 -07:00
Bruno de Oliveira Abinader
54858dae8c [core] Added save/restore capabilities to GL config 2015-10-22 16:02:39 -07:00
Bruno de Oliveira Abinader
5fa144647d [core] Added GLContextMode to MapData
Adding new mbgl::GLContextMode enum to mbgl::Map ctor, which gets stored
in MapData. In shared GL context environments, we cannot assume that the
GL state that has been left since the last draw is the same, so we reset
the GL configurations to their default values.
2015-10-22 16:02:39 -07:00
John Firebaugh
c46a8254c4 [core] Style-sourced shape annotation properties
This introduces the possibility to source the type and style properties
of a shape annotation from a designated layer in the style.
2015-10-22 15:27:53 -07:00
Minh Nguyễn
4f509288b7 [iOS] Removed long-unavailable APIs 2015-10-22 14:27:58 -07:00
Minh Nguyễn
e3934df8d4 [iOS] Replaced styleID property with styleURL__ inspectable
The new styleURL__ inspectable property is carefully named to masquerade as a URL property in Interface Builder, even though IB supports no such thing.

If the user enters an invalid URL into the “Style URL” inspectable, throw an error instead of silently setting the style to the default. This check is not required in -setStyleURL:, which takes a real NSURL.
2015-10-22 14:27:39 -07:00
John Firebaugh
3afc8b4a29 [core] Introduce StyleLayer subclasses 2015-10-22 09:34:40 -07:00
John Firebaugh
df89de5cc5 [core] Rationalize style property classes: <type>{Paint,Layout}Properties 2015-10-22 09:21:30 -07:00
Manabu-GT
84c8d1fd6e add setSetVisibleCoordinateBounds api as already in iOS 2015-10-22 19:58:52 +09:00
Leith Bade
927b4c6dbe [android] Refactor annotations API
Remove unimplemented properties.
Correct defintions of equals() and hasCode().
Add setOnInfoWindowClickListener and remove old method from Marker.
Refactor showInfoWindow() to remove need for exposing internal method.
Make select/deselectMarker public. Add getSelectedMarker.
Fix bug where you couldn't reselect a closed info window.
Add empty constructor to LatLng and LatLngZoom.
Fixes #2546
Fixes #2631
Fixes #2448
2015-10-22 20:00:43 +11:00
Leith Bade
8b79a8d6e6 [android] Implement UserLocationView
Draws animated and synced GPS marker.
Inlcudes direction arrow and accuracy ring.
Fade out the compass after a delay when reset to north.
Lots of other performance and memory improvements.
add OnMyLocationChangeListener
Move FAB with snackbar
Fix getMetersPerPixelAtLatitude
Fix some incorrect annotations
Fixes #2668
Fixes #2411
Fixes #2678
Fixes #2675
Fixes #2566
Fixes #2549
Fixes #2692
Fixes #2572
2015-10-22 17:07:10 +11:00
Leith Bade
2daa5f14a8 [android] Fix bug in setSprite when calculating pixel data size
Change Marker sprite() to icon() and use Sprite class
Load a Maki dog icon in test app
Fixes #2506
2015-10-22 16:18:13 +11:00
Bruno de Oliveira Abinader
5db4670d78 [core] Added more transform state getters
Some platforms requires specific information that was previously not
available in public API, but stored internally in TransformState object.
2015-10-21 11:06:51 -07:00
John Firebaugh
c5b95032a5 [core] Annotation refactor 2015-10-20 13:54:19 -07:00
John Firebaugh
597b2b4851 [core] Pull annotation typedefs to own header; add AnnotationID 2015-10-20 13:54:19 -07:00
Justin R. Miller
24aa375cd1 [ios] tweaks to match code style for 1a5c452 callout tap handler 2015-10-12 11:02:04 -07:00
Maciej Swic
1a5c452fe3 Forwards the SMCalloutView tap delegate 2015-10-12 10:54:53 -07:00
Adam Hunter
1179096dd8 VAO and extension tracking code. 2015-10-06 13:54:36 -07:00
Leith Bade
b869771992 Correctly handle spurious wake-ups in Map::pause()
Fixes #2522
2015-10-06 14:10:32 +11:00
Jason Wray
b406c942df [ios] update MGLMapView inline docs for v8 styles
Fixes #2503
2015-10-02 19:43:04 -04:00
Jason Wray
29da7bb26d [ios] describe radians↔degrees functions 2015-10-02 18:54:53 -04:00
Jason Wray
e565808de0 [ios] fix unintentional omission of delegate sections & methods from docs
Adds these delegate methods that were missing:
  - `mapView:annotation:calloutAccessoryControlTapped:`
  - `mapView:didSelectAnnotation:`
  - `mapView:didDeselectAnnotation:`

Adds these section headers that were missing:
  - Responding to Map Position Changes
  - Managing Annotations
  - Selecting Annotations

Also reorders the sections by priority and grouping.

Fixes #2514
2015-10-02 18:48:26 -04:00
Justin R. Miller
8cc3b12f1e [ios] fixes #2490: add annotation image enabled property 2015-10-02 11:50:53 -07:00
Justin R. Miller
7087a4c55a [ios] fixes #2491: document MGLAnnotationImage 2015-10-01 16:20:05 -07:00