summaryrefslogtreecommitdiff
path: root/platform/macos/app
Commit message (Collapse)AuthorAgeFilesLines
* [macos] Updated macosapp application iconsetMinh Nguyễn2017-04-2016-5/+5
|
* Show zoom level in window's title barEimantas Vaiciunas2017-04-032-7/+15
|
* Per-attribute transition properties on MGLStyleLayer (#8225)Fabian Guerra Soto2017-03-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] new struct MGLTransition * [ios] MGLTransition struct moved to MGLTypes.h * [ios] MGLTransition implemented for style layer properties * [ios, macos] added support for getting property transitions * [ios, macos] updated to MGLDurationFromTimeInterval and MGLTimeIntervalFromDuration * [ios, macos] added transition properties test * [ios, macos] modified key strings imp * [ios, macos] The impl for transition properties were changed to public methods * [ios, macos] Changelog update * [ios] Fixed layer space formatting * [core] The name space was fixed for getters that returned TransitionOptions * [ios, macos] Added rawLayer transition property tests * [ios] Added a factory method for MGLTransition and transition-related methods to NSValue(MGLAdditions) * [ios, macos] Copyedited changelog blurbs about transition properties
* [ios, macos] Russian, Catalan, Lithuanian, Finnish, Dutch (#8256)Minh Nguyễn2017-03-084-0/+0
| | | | | | | | | | | | | | | | * [ios, macos] Updated Russian translations * [ios, macos] Added Catalan translation * [ios, macos] Completed Lithuanian translation * [ios, macos] Added Finnish translation * [ios, macos] Fixed Polish, Ukrainian declension * [ios, macos] Updated changelogs * [ios, macos] Added Dutch localization
* [ios, macos] Rename MGLStyleConstantValue to MGLConstantStyleValueJesse Bounds2017-03-031-3/+3
|
* Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.2Minh Nguyễn2017-02-213-11/+21
|\
| * [macos] Take focus from access token field on closeMinh Nguyễn2017-01-272-3/+14
| | | | | | | | When closing the Preferences window, take focus away from the Access Token text field to force any changes to be committed.
| * [macos] Flatten point collections, not multipointsMinh Nguyễn2017-01-271-8/+7
| |
| * [macos] allow using the integrated GPU on dual-GPU machinesKonstantin Käfer2017-01-261-0/+2
| | | | | | | | Cherry-picked from e7a7c6be789198a8155dc229ea509dd7aecf4756.
* | [ios, macos] Enable localizations in iosapp & macosappJason Wray2017-02-2013-0/+0
| |
* | [core] Enable property functions for text-{field,transform} (#7944)Anand Thakker2017-02-171-5/+6
| |
* | [macos] Round non-freeform zoom gestures/commands to nearest integerJason Wray2017-02-131-2/+2
| | | | | | | | | | | | | | | | | | Affects: - Double-tap gestures - Two-finger tap gestures - +/- button pushes - Shortcut keys - Menu items and shortcut keys (in macapp)
* | [ios, macos] Fixed runtime styling deprecation warningsMinh Nguyễn2017-02-081-6/+6
| |
* | [ios, macos] Add support for data-driven property functionsJesse Bounds2017-02-021-2/+3
| |
* | [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-278-66/+66
| |
* | [macos] enable printingKonstantin Käfer2017-01-262-1/+12
| |
* | [macos] allow using the integrated GPU on dual-GPU machinesKonstantin Käfer2017-01-251-0/+2
| |
* | refs #6779: mobile & Mac SDK style transition options (#7711)Justin R. Miller2017-01-181-0/+3
|/
* [ios, macos] Revert deprecation of alphaForShapeAnnotation: delegate methodJason Wray2017-01-131-3/+2
|
* [macos] Include pitch in shared URLMinh Nguyễn2017-01-091-3/+4
|
* [ios, macos] Renamed text-field, text-font, text-font-size, circle-pitch-scaleMinh Nguyễn2017-01-071-6/+6
| | | | Reduced the likelihood that the developer might attempt to set textField to an NSTextField or UITextField, or textFont to an NSFont or UIFont, or textSize to a CGSize or NSSize, or circlePitchScale to a number (given iconScale).
* [macos] Arrange layers top to bottom in sidebarMinh Nguyễn2017-01-064-4/+55
| | | | Implemented a reversedLayers property on MGLStyle based on the layers property.
* [macos] Refactored label localizationMinh Nguyễn2016-12-203-32/+99
| | | | Localize only Mapbox Streets v6–v7, and do so more systematically than before.
* [ios, macos] Rename MGLGeoJSONSource to MGLShapeSource (#7334)Jesse Bounds2016-12-091-1/+1
|
* [ios, macos] Source-driven attribution (#5999)Minh Nguyễn2016-12-081-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Source-driven attribution Refactored MGLSource initialization. Implemented a new private class, MGLAttributionInfo, that parses an HTML attribution string from TileJSON and stores the resulting structured data. Added methods to MGLTileSet and MGLStyle to aggregate MGLAttributionInfos. On macOS, update the attribution view as soon as the source attribution changes. On iOS, fetch the current attribution information when displaying the action sheet. Removed hard-coded attribution strings. * [macos] Respect inline formatting in attribution HTML Apply a default font and color to attribution HTML as it is imported into an attributed string. Pass the attributed string into MGLAttributionButton as is, without stripping formatting. Avoid overriding the font and color after importing the HTML, in case these attributes are explicitly specified rather than intrinsic to a hyperlink. Constrain the top of the attribution view to all the attribution buttons, in case one of them needs additional headspace. * [ios, macos] Display unlinked attribution strings Unlinked attribution strings are represented on macOS as buttons that have the default cursor and do nothing when clicked. On iOS, they are action sheet buttons that do nothing but dismiss the action sheet. * [macos] Fixed random Auto Layout exception Auto Layout randomly finds itself unable to satisfy constraints when updating attribution, due to some spurious constraints between attribution buttons. Regenerate the entire attribution view every time the source attribution changes. * [ios, macos] Thoroughly dedupe attribution infos Also added a test to verify parity with the GL JS implementation. This implementation avoids sorting. * [ios, macos] Trim whitespace from attribution strings Also added parsing tests. * [ios, macos] Added attribution parsing tests for styles Included an emoji test to ensure that attribution strings are interpreted as UTF-8, to avoid mojibake. Included a test of removing the underline from a leading copyright symbol. * [ios, macos] Derive feedback link from source MGLAttributionInfo now detects feedback links in the attribution HTML code, and it is responsible for tailoring the feedback URL to the current viewport. Removed the hard-coded feedback action from the attribution sheet on iOS in favor of a source-derived feedback title and URL. Moved the feedback action from macosapp to MGLMapView; applications are now expected to hook an Improve This Map menu item to an MGLMapView action.
* [ios, macos] Migrate MGLCustomStyleLayerAdditions to style layer API (#7250)Minh Nguyễn2016-12-074-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Replaced custom style layer API with MGLOpenGLStyleLayer Replaced the custom style layer API on MGLMapView with an equally unsupported MGLOpenGLStyleLayer API that nonetheless is consistent with the broader runtime styling API and is compatible with macOS. Fixed an unrecognized selector crash when wrapping a layer of unrecognized type coming from mbgl. * [macos] Added lime green layer demo to macosapp Reprised the demo removed from iosapp in #5091. * [ios, macos] Rationalized MGLOpenGLStyleLayer API MGLStyle now strongly references any MGLOpenGLStyleLayer object that’s added to it, in order to prevent pointers from going stale and make it easy for layer drawing code to get more information about the map view. Replaced the MGLOpenGLStyleLayer callback blocks with overridable instance methods. Added internal documentation for each method. Subclassed MGLOpenGLStyleLayer as LimeGreenStyleLayer inside macosapp. Consolidated -addToMapView: into -addToMapView:belowLayer: to ensure that MGLRedundantLayerException gets raised even if the layer is being inserted rather than added to the bottom of the stack. * [core] Clarified that rendering happens on the main thread * [ios, macos] Fixed removing and re-adding MGLOpenGLStyleLayer Don’t allow index-based layer removal to circumvent -removeFromMapView:, which MGLOpenGLStyleLayer relies on to synchronize the style’s array of MGLOpenGLStyleLayers. When obtaining an MGLOpenGLStyleLayer, get the instance already added to the style instead of creating a new one to wrap the underlying CustomLayer.
* [ios] s/iconSize/iconScale/Minh Nguyễn2016-12-061-1/+1
| | | | Followup to #7310.
* [ios, macos] Template images as style imagesMinh Nguyễn2016-12-061-0/+16
| | | | Convert template images to SDF icons and back when storing them as style images.
* [macos] Added option to localize labelsMinh Nguyễn2016-11-282-0/+90
| | | | Added a setting to macosapp to change all symbol layers in the current style to use the preferred language if available. If the setting is off, change all symbol layers to use local languages.
* [macos] Name custom style in toolbarMinh Nguyễn2016-11-282-2/+6
| | | | Display the custom style’s name in the Style toolbar button.
* [macos] Added Layers sidebarMinh Nguyễn2016-11-2818-16/+934
| | | | | | Added a sidebar to the main document window in macosapp that lists the layers in the current style and updates whenever the style changes or a layer is added or removed programmatically. Display an icon beside each layer in the sidebar that indicates the kind of layer. Double-click a layer or layers to toggle their visibility, which is an undoable action. Added a menu item and toolbar button to toggle the Layers sidebar. Added a context menu for toggling visibility of and deleting layers selected in the Layers sidebar. Checked in the original SVGs for layer icons.
* [macos] Avoid first responder action name conflictMinh Nguyễn2016-11-284-11/+11
| | | | Fixed a crash that often occurred when switching styles. MGLMapView was ahead of MapDocument in the responder chain, so calls to -setStyle: were going to MGLMapView’s private -setStyle: method. The sender was being passed in the first parameter instead of an MGLStyle method.
* [ios, macos] Expand changes to entire APIMinh Nguyễn2016-10-171-7/+6
|
* [ios, macos] Deprecate -[MGLMapViewDelegate ↵Jason Wray2016-10-141-2/+3
| | | | mapView:alphaForShapeAnnotation:] (#6706)
* [ios, macos] Revamped MGLStyleLayer, MGLSource inheritanceMinh Nguyễn2016-10-061-2/+2
| | | | | | | | | | Removed the MGLStyleLayer protocol, because almost none of its members was actually implemented in every class that adopted the protocol. Removed the unused mapView backpointer property with no replacement. Renamed MGLBaseStyleLayer to MGLStyleLayer. Created the intermediate abstract classes MGLForegroundStyleLayer and MGLVectorStyleLayer to cover subsets of style layer classes with like functionality. Moved each MGLBaseStyleLayer initializer and the corresponding properties down to an abstract subclass such that the initializer makes sense for all concrete subclasses. Moved more initializers and the predicate property up to MGLVectorStyleLayer to eliminate duplication among the concrete subclasses. Marked these initializers as designated initializers. Removed “source” or “layer” before identifier wherever the type of identifier is apparent. Removed extra MGLGeoJSONSource initializer variants in favor of nullable parameters. Added copious documentation comments for source and style layer classes, including several previously undocumented methods and properties. In particular, some preconditions and postconditions have been documented. Added pragma marks to break up the jazzy documentation pages into sections. Reformatted exceptions for consistency.
* [ios, macos] Put MGLStyleLayer inits in respective classesJesse Bounds2016-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Previously, we declared MGLStyleLayer initializers in the MGLStyleLayer protocol as optional methods. This made it easy to opt in and out of initializers that did or or did not make sense for the subclass. However, this approach was dangerous since it was easy for an application developer to initialize an MGLStyleLayer subclass with an init method that was actually not implemented in that class causing an exception at runtime. This commit moves the init methods that each subclass supports to each subclass so xcode (and the compiler) help the developer avoid the previously possible runtime exception. In addition, a new init method is added that takes the source layer and passes that on to `mbgl::style:Layer` (but only on classes where this is possible in core). This allows an application developer to style a specific source layer (i.e. the contour lines of the mapbox terrain vector source). Finally, this refactors MGLStyleLayer classes to use an MGLSource instead of a string identifier for the source when initializing the style.
* [ios] Added support for filters (NSPredicate)Fredrik Karlsson2016-09-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ios, macos] cleaned up filters [ios] added a filter example [ios] utest filters [ios, macos] nested predicates [ios] refactored [ios] filter -> NSPredicate [ios] fixed mbgl::Any/AllFilter -> NSPredicate [ios] translate nested mbgl::NotIn filters [ios] cleanup and added more utests [ios] fixed a bug in the None filter conversion and improved utests [ios, macos] doc [macos] added missing category [ios, macos] additional utests [ios, macos] updated documentation
* [core] add ability show visualize the depth buffer to the GLFW and macOS appKonstantin Käfer2016-08-192-1/+19
|
* [macos] Moved runtime styling demo to Debug menuMinh Nguyễn2016-08-173-14/+15
| | | | Fixes #6022.
* [ios, macos] Use local GeoJSON for runtime styling demoMinh Nguyễn2016-08-172-2/+3
| | | | | | Also changed the menu item to something more descriptive. Fixes #6021.
* Runtime styling API for iOS/macOS (#5727)Fredrik Karlsson2016-08-112-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios] wip runtime styling * [ios, macos] Outlined header templates * [ios, macos] cleanup and use appropiate data types * [ios, macos] removed refs to mbgl and added convenient color methods on UIColor and NSColor * [ios, macos] updated header template, included doc string * [ios, macos] outlined template for layer implementation files * [ios, macos] moved script to platform/darwin and updated comments * [ios, macos] Cleaned up the implementation template * [ios, macos] removed unused function and added support for more datatypes * [ios, macos] overhauling the type protocols * [ios, macos] removed unnecessary style classes * [ios, macos] added support for more types * [ios, macos] fixed string and number prop values * [ios, macos] enum getters * [ios, macos] added removeLayer() and removed unused layer ref * [ios, macos] fixed remaining layer types and converted style layer into a protocol * [ios, macos] fixed addLayer() and added example for line layer * [ios] GeoJSON source now works * [ios] fixed raster layer and raster source * [ios] fixed attr prop number and outlined prop function * [ios] wip functions * [ios] bool and float function fix * [ios] cleanup * [macos] fixed support for macos * [ios] fixed string functions * [ios] extended array functions * [ios] added tests and fixed a few bugs * [ios] less verbose functions and improved tests * [ios, macos] Removed unnecessary use of default arguments Default arguments aren’t supported in Node v4, and they aren’t needed here anyways, because we’re only testing for truthiness. * [ios, macos] Enum setters Rely on a macro instead of category methods to specialize the setter implementation for enum attributes, since generic types are disallowed in Objective-C method signatures and mbgl::style::PropertyType must be type-qualified. * [ios, macos] Got macOS closer to parity w/ iOS Added various classes and test classes to the macOS workspace. Also fixed lots of compiler errors and updated macosapp runtime styling example to use the new dictionary syntax for function stops. Updated all conversions from Objective-C stops to C++ stops to enumerate over the dictionary. Fixed compiler errors in enum setter implementations. Also corrected path to script in generated file comments. * [ios, macos] Added EJS templates to project * [ios, macos] Code formatting Made code format more consistent. * [ios, macos] Spelled out ID Cocoa convention is to always spell out “ID” as “identifier”, in part to avoid confusion with the id keyword. Also, URL is capitalized in most contexts, including property names. * [ios, macos] Grouped related headers together * [ios, macos] Cleaned up layer transformation Also added support for converting background layers into Objective-C. * [ios, macos] Cleaned up tests Also made the tests work on macOS by introducing a new window to host the map. * [ios, macos] Replaced TODOs with #warnings * [ios] convert array based property values * [ios, macos] color function/undefined getter * [ios, macos] fixed function/undefined getters for bool and float properties * [ios, macos] more function/undefined property getters * [ios, macos] more type conversion and cleanup * [ios, macos] disable macos runtime styling tests for now * [ios, macos] cleaned up style code script * [ios, macos] more type conversion * [ios] added a base layer to handle visibility min/max zoom * [macos] fixed base layer * [ios, macos] use accessor methods * [ios, macos] cleanup * [ios, macos] add geojson to ios and macos * [macos] rebase fix * [ios, macos] fixed enum getters and added tests for enums * [ios, macos] added an update method to base layer * [ios, macos] added some documentation * [ios, macos] docs * [ios, macos] removed refs to filters for now * [ios, macos] various tail work * [ios, macos] missing import and incorrect type
* [macos] Add `showAnnotations:` methods (#5749)Jason Wray2016-07-212-7/+21
| | | | | | | | SDK - Ported `showAnnotations:animated:` and `showAnnotations:edgePadding:animated:` from the iOS SDK. Demo App - Added "Show All Annotations" debug menu item with ⇧⌘A shortcut key. - Disabled "Add Animated Annotation" debug menu item when the annotation already shown.
* Quadkey tokens in tile URL templates, limited WMS support (#5628)Minh Nguyễn2016-07-121-0/+21
| | | | | | | | | | | | | | * [core] Quadkey tokens in tile URL templates Fixes #5485. * [core] WMS tokens in tile URL templates Fixes #822. * [macos] Added WMS debug style Added a style to the macosapp resource bundle that can be used to test WMS support. To use it, zoom in to somewhere in New Jersey, then go to View ‣ Custom Style and enter “wms.json”.
* [macos] Revised keyboard shortcuts in macosappMinh Nguyễn2016-07-081-12/+12
| | | | Followed up #5452 with some changes to keyboard shortcuts that ensure conformance to the HIG and avoid conflicts between menu items.
* [macos] add keyboard shortcuts to macosappKonstantin Käfer2016-07-071-26/+20
|
* [macos] Use gesture recognizer for context menuMinh Nguyễn2016-07-071-1/+1
| | | | | | NSView’s built-in context menu handling preempts non-right-click gesture recognizers, so preempt it with a right-click gesture recognizer that does essentially the same thing. With this change, two-finger double-tapping on a trackpad also zooms out, consistent with MapKit. Fixes #5078.
* [ios, macos, node] “Mapbox GL Style Specification” → “Mapbox Style ↵Minh Nguyễn2016-07-041-1/+1
| | | | Specification” (#5553)
* [ios, macos] Renamed overdraw to overdraw visualization (#5416)Minh Nguyễn2016-06-222-13/+13
| | | A verb doesn’t make sense in this enum value. Instead, use a descriptive word for this effect and describe it in detail in the documentation comment.
* [core] s/Wireframe/Overdraw/gBruno de Oliveira Abinader2016-06-202-7/+7
|
* [macos] Add "Add Animated Annotation" to the Debug menuJohn Firebaugh2016-06-172-4/+32
|