Commit Graph

25 Commits

Author SHA1 Message Date
Jason Wray
21ce6fbdf9 [osx] Set default polyline and polygon color to the selected menu item color
Fixes #3927
2016-02-18 19:27:49 -05:00
Minh Nguyễn
70f04c8bc5 Updated gesture help
Followup to #3426.
2016-01-05 00:02:33 -08:00
Minh Nguyễn
8aad739ec2 [osx] Fixed map feedback zoom level
The map feedback tool still uses mapbox.js, so its zoom levels are one off from Mapbox GL’s.
2016-01-04 11:40:31 -08:00
Minh Nguyễn
e17e27fb0e [osx] Corrected initial title for restored windows 2016-01-04 11:40:31 -08:00
Minh Nguyễn
0a23d4fe39 [osx] Restore last window regardless of system preference
Even with the system preference set to close windows when quitting, the user would still expect this map-centric application to remember the last viewed map, because the world map isn’t quite as interesting.
2016-01-04 11:40:31 -08:00
Minh Nguyễn
44a4f7bca2 [osx] Fixed URL handler, reload for new access token 2016-01-04 11:40:23 -08:00
Minh Nguyễn
019b3d5b92 [osx] Respect system window closing preference
Instead of forcing the system to restore windows between sessions (which confusingly switches the behavior of ⌘Q and ⌥⌘Q), honor the preference but have each new window inherit the style of the previous main window.
2016-01-04 11:40:18 -08:00
Minh Nguyễn
0712ed904b [osx] Make osxapp document-based
Allows for multiple map windows open at a time.
2016-01-04 09:33:00 -08:00
Minh Nguyễn
ba6edac01e [osx] Restore last viewed style at launch
Fixes #3389.
2015-12-22 22:41:15 -08:00
Minh Nguyễn
b8378420d4 [osx] Typo in osxapp help 2015-12-19 14:36:22 -08:00
Minh Nguyễn
d3c92a8b5c [osx] Fixed path to embedded framework
Xcode (or perhaps gyp’s Xcode adapter) doesn’t understand \$ inside a copy files run phase path.

ref #3337
2015-12-17 13:15:43 -08:00
Bruno de Oliveira Abinader
c08a97e453 [osx] Fixed 'make compdb' target'
[skip ci]
2015-12-17 12:28:36 -08:00
Minh Nguyễn
4e0e816653 [ios, osx] Added flyToCamera: variation that uses default duration 2015-12-15 12:52:13 -08:00
Minh Nguyễn
42e32b8d16 [osx] World tour
A new Debug menu command takes you on a tour of the world by air.
2015-12-15 12:52:13 -08:00
Minh Nguyễn
0722d26846 [osx] Remove All Pins command
Also fixed an issue where removing a selected annotation failed to deselect it.
2015-12-13 17:26:53 -08:00
Minh Nguyễn
b869d3c820 [osx] Persist viewpoint across relaunch 2015-12-13 17:26:53 -08:00
Minh Nguyễn
3f2fae521c [osx] Don’t strip on copy in Debug
Stripping the framework means you can’t debug the framework.
2015-12-13 17:26:53 -08:00
Minh Nguyễn
bab3935431 [osx] Fixed standalone launch of osxapp (and run-xosx)
Mapbox.framework needs to be embedded in the application bundle.
2015-12-13 17:26:53 -08:00
Minh Nguyễn
ea57be5598 [osx] Documentation comments for public classes
Added documentation comments for all the public headers that aren’t being shared with iOS.

Removed an animated: parameter from -selectAnnotation: and -deselectAnnotation:: because callout popovers may extend beyond the entire window, there is no need to scroll the map to make the entire callout visible.

Added missing geometric conversion methods.

Renamed -mapView:regionWillChangeAnimated: et al. to say “camera” instead of “region”. “Region” leaves ambiguity about whether properties like rotation and pitch trigger this method. “Camera” associates these methods with the camera property, which seems apt.
2015-12-13 17:26:53 -08:00
Minh Nguyễn
df0511af18 [osx] Build framework based on static library 2015-12-13 17:26:53 -08:00
Minh Nguyễn
9d2e0a19ef [osx] Blanket the map with pins 2015-12-13 17:26:53 -08:00
Minh Nguyễn
004d04075a [osx] Annotation cursors
Also added an option to osxapp for assigning a random cursor to all the annotations each time an annotation is added or removed.
2015-12-13 17:26:53 -08:00
Minh Nguyễn
f542d7b2a7 [osx] Annotation tooltips
Annotations can optionally have tooltips. osxapp has an option, off by default, to assign a (localized) tooltip to each dropped pin.
2015-12-13 17:26:53 -08:00
Minh Nguyễn
96145ef170 [osx] Drop Pin context menu item 2015-12-13 17:26:53 -08:00
Minh Nguyễn
0cab7809eb [osx] Rewrote platform-osx and osxapp
platform-osx now vends a real NSView subclass, MGLMapView, that is readily embedded inside a Cocoa application for OS X. MGLMapView is backed by an NSOpenGLLayer for optimal performance and integration with other layer-backed views. It supports keyboard shortcuts and several gestures and hosts attribution, zooming, and rotation controls as subviews. osxapp is now a bona fide Cocoa application that embeds MGLMapView inside a XIB. osxapp has preferences and a share button for tight integration with custom styles.

Enabling asynchronous rendering would be more consistent with iOS but increases CPU usage so much, even when idle, that it isn’t worth any performance gain. The bigger issue is that VAOs aren’t being used.

make xpackage creates a static library similar to the one created by make ipackage. make clean cleans additional places where build output ends up.

The OS X minimum deployment target has been increased from 10.9 to 10.10. osxapp’s window has a full size content view, which requires 10.10. Lightweight generics require iOS 9+ and OS X 10.11 regardless, because it was only in that release that Foundation collection classes started adopting lightweight generics.

Shuffled files around and refactored annotations so that iOS and OS X share a good chunk of the annotations code, which now takes advantage of polymorphism. MGLMapView can now display annotations but cannot yet select them. In osxapp, a long press drops a pin, and so does the map view’s context menu.

Annotations have NSPopovers as callouts, and their view controllers can be customized. Annotation image alignment rects are respected for hit testing purposes and for positioning the callout anchor. Callouts in osxapp demonstrate the use of bindings to keep callouts in sync with underlying model objects.
2015-12-13 17:17:35 -08:00