summaryrefslogtreecommitdiff
path: root/platform/macos
Commit message (Collapse)AuthorAgeFilesLines
* [docs] Add note about MGL_EXPORT to macOS documentationKonstantin Käfer2017-01-041-0/+1
|
* [macOS] use SourceKit to ensure that all public symbols are exportedKonstantin Käfer2017-01-041-0/+3
|
* [build] add -fvisibility=hidden to macOS dynamic framework and export ↵Konstantin Käfer2017-01-046-17/+36
| | | | required symbols
* Happy new year! 🎉Minh Nguyễn2017-01-041-1/+1
|
* [macos] Added Simplified Chinese localizationMinh Nguyễn2016-12-213-0/+23
|
* Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.5-masterMinh Nguyễn2016-12-2020-183/+460
|\ | | | | | | Also reran make style-code and manually discarded anything related to fill extrusion layers.
| * iOS jazzy theme improvements (#7422)Maya Gao2016-12-161-1/+1
| | | | | | some small improvements to the theme
| * Use appropriate part of speech for properties (#7457)Minh Nguyễn2016-12-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Use appropriate part of speech for properties Fixed overridden property references in requirements lists. Boolean-typed properties can now have getters beginning with “is”. Renamed a number of layout properties according to the following rules: Boolean-typed properties should include a verb; other properties must be noun phrases; all properties must be grammatical. * [ios, macos] Added style spec names as unavailable aliases Renamed properties now have aliases based on their style specification names, marked unavailable, for wayfinding purposes. * [ios, macos] Fixed autosynthesis warnings * [ios, macos] Moved style layer test template to test folder * [ios, macos] Customized iconOptional getter * [ios, macos] Avoid autosynthesis of aliases * [ios, macos] Test that property names are grammatical Run property getter names through a basic battery of tests to see if they’re grammatical. Most part-of-speech tagging tests are guarded by a compile-time flag, off by default, because NSLinguisticTagger does a poor job of telling nouns from verbs, and we’ve intentionally kept many words in property names that could be read as either verbs or nouns (like “transform” or “scale”).
| * [ios, macos] Simplify MGLSource and subclasses (#7377)Minh Nguyễn2016-12-133-30/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Audited source headers for nullability * [macos] Made MGLTileSet public * [ios, macos] Replaced MGLTileSet with MGLTileSource MGLRasterSource and MGLVectorSource now share a common abstract superclass, MGLTileSource. MGLTileSet has been removed. MGLTileSource is modeled after mbgl::style::RasterSource and mbgl::style::VectorSource. It has initializers that incorporate the parameters of MGLTileSet’s initializers, but it lacks getters for everything but the attribution string. MGLTileSet’s properties have been converted into options that can be passed into MGLTileSource’s initializers in a dictionary. Properly implement rawSource as a covariant property so that it doesn’t end up getting autosynthesized as a shadow ivar. This prevents concrete subclasses of MGLSource from setting _rawSource directly but getting a different value out of self.rawSource. Marked -[MGLSource init] as unavailable and ensured that concrete subclasses of MGLSource have the right set of initializers marked as designated initializers. Documentation comments for each concrete source class identify the corresponding source type in the style specification. Clarified the purpose of MGLTileSetScheme, now known as MGLTileCoordinateSystem. * [ios, macos] Clarified tile size interpretation Sticking to a default value of 256 for mapbox: URLs, but other URLs get the standard 512 value. * [ios, macos] rawSource is always set * [ios, macos] Cleaned up MGLShapeSource initialization rawSource is never nil, so there’s no need for a -commonInit method. Extracted -geoJSONOptions from MGLShapeSource into a standalone function for easier testing. * [ios, macos] Synchronized headers in project Realphabetized headers in groups. Added headers missing from one project or the other. * [ios, macos] Added MGLShape methods to (de)serialize GeoJSON data Added a class initializer and instance method to MGLShape that deserialize and serialize the shape as GeoJSON data, respectively. The new initializer handles parsing errors gracefully. Removed methods specific to GeoJSON data from MGLShapeSource, in an effort to reduce parallel state. Developers are now expected to go through the new MGLShape initializer to get an MGLShape representation. Alternatively, a local file URL can be passed into the other MGLShapeSource initializer. * [ios, macos] Typo in assertion message * [ios, macos] Simplified GeoJSON serialization Every MGLShape now knows its most specific mbgl::GeoJSON representation. * [ios, macos] Reremoved MGLFeaturePrivate mbgl::GeoJSON, which is a variant, allows a single GeoJSON representation method to traffic in whatever type is needed for a particular shape class. This change removes some hidden private protocols, which are a bug waiting to happen. * [ios, macos] Fixed covariant rawLayer property Properly implement rawLayer as a covariant property so that it doesn’t end up getting autosynthesized as a shadow ivar. This prevents concrete subclasses of MGLStyleLayer from setting _rawLayer directly but getting a different value out of self.rawLayer. * [ios, macos] Use MGLAttributionInfo for source attribution Made MGLAttributionInfo public. Replaced MGLTileSource’s attribution property with an attributionInfos property set to an array of MGLAttributionInfo objects. Added an MGLTileSourceOption for specifying an array of MGLAttributionInfo objects instead of an HTML string (either is acceptable when creating an MGLTileSource). * [ios, macos] Corrected method references in documentation
| * [ios, macos] Load features into shape source if possible (#7339)Jesse Bounds2016-12-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This checks the kind of MGLShape passed into the source and, if it is a feature, it mbgl feature objects to pass to core. This keeps the feature id and attributes data intact. If the shape is a `MGLShapeCollectionFeature` it creates an `mbgl::FeatureCollection` object (also to keep feature properties). If the shape is not any sort of feature, it passes along just the geometry. This also uses the MGLFeatureFromMBGLFeature converter for the case where GeoJSON data passed in to a source contains a single feature. The converter has logic to keep the id and attributes properties intact. Before, these properties were lost because only geometry conversion was done. Finally, logic to handle (and associated tests) of nested shape collection features is removed since that is not supported by the GeoJSON spec or the core implementation. [ios] Add test of drawing plain shape to iosapp
| * [ios, macos] Expanded source documentationMinh Nguyễn2016-12-101-1/+1
| | | | | | | | Also fixed a few stray references to GeoJSON sources.
| * [ios, macos] Rename MGLGeoJSONSource to MGLShapeSource (#7334)Jesse Bounds2016-12-094-19/+19
| |
| * [ios, macos] Source-driven attribution (#5999)Minh Nguyễn2016-12-0811-124/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [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.
| * Prevent stopless functions (#7309)Fredrik Karlsson2016-12-071-0/+6
| | | | | | | | | | | | * [ios, macos] prevent stopless functions * [ios, macos] removed unused bridging header and fixed naming
| * [ios, macos] Migrate MGLCustomStyleLayerAdditions to style layer API (#7250)Minh Nguyễn2016-12-078-3/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [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, macos] More ways to reshape an MGLMultiPoint (#7251)Minh Nguyễn2016-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Completed API for mutating multipoints Added the complete set of methods for mutating the vertices of an MGLMultiPoint. Also rewrote MGLMultiPoint documentation to refer to vertices instead of points. * [ios, macos] Removed inaccurate MGLOverlay commentary This paragraph is full of references to features that exist in MKOverlay but not MGLOverlay. * [ios, macos] Lazily compute multipoint bounds Invalidate the bounds whenever the coordinates change, but don’t recompute the bounds until they’re requested. Simplified -intersectsOverlayBounds: for immutable overlay classes. Added a utility function for testing whether two MGLCoordinateBounds intersect, based on mbgl::LatLngBounds::intersects(). Removed unused color conversion code.
| * [ios] s/iconSize/iconScale/Minh Nguyễn2016-12-061-1/+1
| | | | | | | | Followup to #7310.
| * [ios, macos] Template images as style imagesMinh Nguyễn2016-12-062-1/+19
| | | | | | | | Convert template images to SDF icons and back when storing them as style images.
| * [ios, macos] MGLGeoJSONSource can now be initialized with any shapeFredrik Karlsson2016-12-061-4/+4
| |
| * [core, ios, macos] Add image accessor to MGLStyle (#7096)Roman Blum2016-12-053-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | * [core] Add interface to get image from sprite atlas * [tests] Add tests for Map::getImage * [ios, macos] WIP: get MGLImage for name from style * [ios, macos] Fixed -imageForName: Convert from sprite images to platform images using the existing encodePNG() function, which is also used for printing. Allow -imageForName: to return nil without an assertion failure. Added a basic test.
* | [build] add -Wl,-bind_at_load to node.js bindings on macOSKonstantin Käfer2016-12-141-0/+1
| | | | | | | | this catches unbound symbols during loading of the extension, allowing us to spot potential linking errors earlier
* | [build] ICU is now configured per platformBruno de Oliveira Abinader2016-12-121-0/+3
| |
* | [ios, macos] Update changelogs (#7287)Minh Nguyễn2016-12-051-0/+2
| | | | | | | | | | | | * [ios, macos] Updated changelogs * [ios, macos] Removed duplicate changeset entries
* | [all] Upgrade to boost 1.62.0John Firebaugh2016-12-051-1/+1
| |
* | Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.4-masterMinh Nguyễn2016-12-0325-65/+1202
|\ \ | |/
| * [ios, macos] Rename MGLMapViewTests back to MGLStyleLayerTestsJesse Bounds2016-12-021-10/+10
| |
| * [ios, macos] renamed MGLStyleLayerTests to MGLMapViewTestsIvo van Dongen2016-12-021-10/+10
| |
| * [ios, macos] Make tap gesture recognizer fail if it doesn’t do anything ↵Jesse Crocker2016-12-012-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#7246) * Make tap gesture recognizer fail if it doesn’t do anything. * fix typo * Use the right nullable * update changelog * Make single click gesture recognizer fail if it doesn’t select an annotation * fix changelog typo * Remove singleTapGestureRecognizer from public header
| * [ios, macos] Add notes to APIs that rely on style and source ids (#6886)Jesse Bounds2016-11-301-0/+23
| | | | | | Update documentation to make the implications of identifiers clearer.
| * [ios, macos] Marked C array parameters as constMinh Nguyễn2016-11-292-1/+2
| | | | | | | | Fixes #7214.
| * [ios, macos] Refcount view activations (#7208)Jesse Bounds2016-11-291-0/+11
| | | | | | | | | | | | | | | | This adds a ref count to guard against calling activate after it has already been called. This can happen when a layer is added during certain map lifecycle methods like MapChangeWillStartRenderingFrame that also triggers activation. This also protects against issues related to a deactivation of the context happening in an inner scope while an outer scope is still expecting to be able to use the context.
| * [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-2819-16/+940
| | | | | | | | | | | | 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] Key-value compliance for MGLStyleMinh Nguyễn2016-11-282-12/+40
| | | | | | | | | | | | Replaced -[MGLMapView style] with a property. Keep the MGLStyle object around for the lifetime of the style. Bracket changes to layers in willChange and didChange calls. The built-in point annotation layer is added after the style is finished loading but before the map is finished loading. Cause a second wave of change notifications to go out, about both sources and layers. Issue change notifications for style layers when shape annotations are added or removed.
| * [ios, macos] Refactor runtime styling enumeration propertiesJesse Bounds2016-11-222-0/+13
| | | | | | | | | | | | | | Correctly map SDK runtime styling enumerations to mbgl equivalents. Also, add category methods to NSValue so enums can be wrapped up with less of the details of how they are layed out in memory in Objective-C.
| * [ios, macos] Updated changelog for #7091Minh Nguyễn2016-11-221-0/+1
| |
| * [ios, macos] Documented localization workflowMinh Nguyễn2016-11-181-0/+9
| |
| * [ios, macos] Updated changelogMinh Nguyễn2016-11-151-1/+1
| |
| * [ios, macos] 3.4.0/0.3.0 sections in changelogsMinh Nguyễn2016-11-111-1/+1
| |
| * [ios, macos] Fixed crash getting annotation viewMinh Nguyễn2016-11-081-7/+2
| | | | | | | | Streamlined -[MGLMapView annotationTagForAnnotation:] to use the mapping added in #5987. Reverted an unsafe access into that mapping that was added in #5987; returning nil is preferable when no such annotation can be found. Return the user location annotation view when given the user location annotation.
| * [macos] Map annotations to annotation tagsMinh Nguyễn2016-11-081-0/+9
| | | | | | | | Optimized lookup of annotation tags by annotation from O(n) to a simple map lookup, for better performance and consistency with the iOS implementation of MGLMapView.
| * [ios, macos] Work around annotation race condition (#6924)Jesse Bounds2016-11-041-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When annotations are removed concurrently with being updated because of a map redraw, it is possible that mbgl will still consider an annotation to exist depending on what part of the map lifecycle the call update annotations happens. However, the annotation context by tag map in MGLMapView (on the main thread) will always be up to date. This adds a guard that uses that map to avoid considering annotations that have actually been removed as visible. Another issue was that adding the same annotation object twice has always been allowed and has worked, visually. However, a recent refactor to make the reuse queue work correctly is not tolerant of the a single view representing two annotation instances that are the same. The effect is that a new UIView will be generated for each (clone) annotation that is added and only the last view will move with the map. The other views become detached and float around in the view as the map is panned. This commit adds a guard to make adding an annotation instance a no-op if it has already been added before.
* | [ios, macos] renamed MGLStyleLayerTests to MGLMapViewTestsIvo van Dongen2016-11-301-10/+10
| |
* | [build] upgrade to variant 1.1.4 and dependenciesKonstantin Käfer2016-11-282-0/+11
| |
* | [core] remove unused umbrella header in favor of individual includesKonstantin Käfer2016-11-222-2/+2
| |
* | [build] move logging to utilKonstantin Käfer2016-11-221-1/+1
| |
* | [build] move headless rendering files to platform/defaultKonstantin Käfer2016-11-221-2/+5
| |
* | [build] move default ThreadPool implementation to platform/defaultKonstantin Käfer2016-11-222-2/+3
| |