Commit Graph

920 Commits

Author SHA1 Message Date
Minh Nguyễn
d3fe798493 [ios] Split out MGLMapViewDelegate into separate header 2016-06-06 01:28:04 -07:00
Jesse Bounds
2fe7d04e5e [ios] Update podspecs for 3.3.0-beta.1 2016-06-03 16:17:56 -07:00
Minh Nguyễn
aedaef832f [ios] Updated changelog
Added entries to the iOS SDK changelog for #5124, #2444, #5141, #5164. Removed entries for changes made since the last release; they go in the GitHub prerelease notes but not here in this document.
2016-06-03 16:00:26 -07:00
Minh Nguyễn
1f622fe48f [ios] Made annotation views accessible
Annotation views now serve as their own accessibility elements. The developer’s own subclass of MGLAnnotationView can customize the view’s accessibility frame and/or path to more accurately reflect the visual hit target.
2016-06-03 15:13:21 -07:00
Minh Nguyễn
1fdda914e0 [ios] Corrected annotation view accessibility frame
Corrected the accessibility frames of annotation views to match the views’ bounds instead of the bounds of the default annotation image (which could be empty if no default GL point annotation has been added).

Fixes #5038.
2016-06-03 15:13:17 -07:00
John Firebaugh
2fd673befc [docs] Remove references to manual submodule initialization 2016-06-03 09:51:39 -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
Jesse Bounds
d9c6181f34 [ios] Add annotation container view (#5194)
Add a container view to hold annotations. This gets around a performance
issue with `UIView:addSubview:` where adding views is N^2. It helps
annotation views avoid cutting into callout views when the annotation
views are transformed to be "flat".
2016-06-01 17:36:07 -07:00
Jason Wray
f41546e614 [ios] Default to Debug BUILDTYPE, but explicitly set Release for deploys 2016-06-01 15:54:46 -04:00
Jason Wray
c08a54dd82 [ios] Fix static framework conglomeration
- Include libMapbox.a, which contains our Obj-C classes, in the fat archive.
- Simulator libraries now always include x86_64 slices.
2016-06-01 15:54:46 -04:00
Bruno de Oliveira Abinader
a3e0c60a7c [build] Added unique_resource as dependency 2016-06-01 13:53:39 +03: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
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
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
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
Jesse Bounds
5c9968b089 [ios] Update changelog for annotation view distance scaling. 2016-05-27 12:52:10 -07:00
Jason Wray
2f25c1ac43 [ios] Update changelog for raster memory leak fix in #5141 2016-05-27 12:23:50 -04: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
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
Minh Nguyễn
102e62ae55 [ios] KIF tests require submodules
Documented the submodule step for running KIF-based SDK UI tests. This happened as part of installing core dependencies until #5122.
2016-05-25 22:49:22 -07:00
Jason Wray
842de0e859 [ios] Fix points/shapes typo that caused crash (#5142)
https://github.com/mapbox/mapbox-gl-native/pull/5097 introduced different arrays for points and shapes, but only ever attempted to use the points array. Adding a shape would crash.
2016-05-25 17:48:51 -04:00
Konstantin Käfer
e2bcea90fc [core] use #pragma once instead of ifdef include guards 2016-05-25 21:35:37 +02:00
Jason Wray
9c9140595e [ios] Set backup exclusion flag after initializing DefaultFileSource (#5124)
Speculatively fixes #511, where apps mistakenly backup the offline/ambient cache.
2016-05-24 22:00:52 -04:00
Jason Wray
72bc22292f [ios] Only show telemetry debug log options when logging is enabled 2016-05-23 10:36:20 -04:00
Jason Wray
df1d63a229 [ios] Remove custom style layer example 2016-05-23 10:35:14 -04:00
Minh Nguyễn
2865e7d35c [ios, osx] Added wireframe debugging mask
Added an option to MGLMapDebugMaskOptions for the new wireframe debugging mode and UI in the demo applications for toggling it.
2016-05-23 11:51:05 +03:00
Minh Nguyễn
645dd25d0b [ios, osx] Fixed crash adding mixture of points and shapes
Fixes #5096.
2016-05-22 23:49:11 -07:00
Jesse Bounds
7004932fcd 3.3.0-alpha.3 2016-05-20 14:53:25 -07:00
Jesse Bounds
ace6c68e2a Updated changelog for #5067 2016-05-20 14:43:39 -07:00
frederoni
a220efcae6 [ios] Allow annotation views to be flattened (#5067)
* [ios] wip flatten annotation view

* [ios] wip flatten annotation view

* [ios] naming conventions

* [ios] removed unused property
2016-05-18 17:03:08 -07:00
frederoni
e8ea7483a7 [ios] Added centerOffset to MGLAnnotationView (#5062)
* [ios] Added centerOffset to MGLAnnotationView

* [ios] Reposition immediately after changing the centerOffset

closes #5059
2016-05-18 09:47:54 -07:00
Jason Wray
22447373ae [ios] Make MGLCoordinateInCoordinateBounds() public (#5053)
Bounds should always be in NE, SW order — any other coordinate order (e.g., NW, SE) will give false results.
2016-05-17 11:02:22 -04:00
Minh Nguyễn
54381d20a0 [ios] Updated changelog for #4801 2016-05-15 11:07:29 -07:00
Jason Wray
0d5d2a923b [ios] Improve telemetry server URL validation (#5022)
- Validate that test server URL actually has a reasonable value.
- Refactor `baseURL` and `testServerURL` to use NSURL.
2016-05-13 21:46:13 -04:00
Jesse Bounds
1ee14915f8 [ios] Add method documentation for view based annotations. 2016-05-13 15:53:04 -07:00
Jesse Bounds
fb759e8475 [ios] Refactor of annotation view updates
This change eliminates the call to the problematic
`annotationTagsInRect:` by using the annotation views themselves
and the map view to check if a view is visible or not.
2016-05-13 15:52:53 -07:00
Jesse Bounds
39669243b7 [ios] Introduce MGLAnnotationView and support for view annotations
Add an UIView subclass that can be used as the base class for all
client provided UIViews for annotations.

Teach MGLMapView to be able to display annotation views over the map if provided by the client delegate. For now, if the delegate provides a UIView then it will be used. If not, the map view will fall back to the old strategy of using GL annotations with an image provided by the delegate or a default image if not.
The map keeps a reuse queue and will store annotation views that are panned
offscreen in the queue if the application developer supplied a reuse queue identifer. The views in the queue are reused when more annotation
views are required. This view reuse provides a performance gain when many
annotations are shown and most of them are offscreen.

iosapp now implements the new delegate method to supply
a native view.

Add a playground to the workspace to facilitate experimentation
with new features. A playground is capable of importing frameworks if it
exists in the same workspace that builds the imported framework. The
initial playground demonstrates annotation views.

This also fixes a crash due to nullptr in annotations array If the `annotations` method is called while the user dot's callout view was showing, the userdot annotation is represented as null in the annotation context map. This
caused a crash when the null pointer was attempted to be converted
into an NSArray via C array. This protects against this bug by filtering out such a null annotation.
2016-05-13 15:51:40 -07:00
John Firebaugh
9a7b7f6af3 [core] Update to geometry.hpp 0.5.0 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
Brent W
348cfaab12 [ios] fix potential for very slow animations of user location dot (#4997)
fix logic error that could cause user location to animate extremely slowly if there is a significant time passing between location updates
2016-05-10 16:55:00 -07:00
Minh Nguyễn
02f89b23b8 Merge branch 'release-ios-v3.2.2' into 1ec5-release-ios-v3.2.2-master 2016-05-10 13:11:47 -07:00
Minh Nguyễn
abe16952c6 ios-v3.2.2 2016-05-10 10:52:50 -07:00