summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLShapeSource.h
Commit message (Collapse)AuthorAgeFilesLines
* [ios][documenation] add additional code snippets to API docsJosh Erb2019-01-301-1/+1
|
* [ios] Update more URLs to docs.mapbox.com/iosJason Wray2019-01-251-4/+4
|
* [ios, macos] Support getLeaves (and related) clustering methods (#12952) ↵Julian Rex2019-01-141-0/+42
| | | | following feature extension API (#13382)
* [ios][documentation] link API documentation to ios-sdk/examplesJosh Erb2018-11-131-0/+16
|
* [ios, macos] Introduce `MGLShapeSourceOptionLineDistanceMetrics`Mikhail Pozdnyakov2018-08-211-0/+12
| | | | | Exposes access to https://www.mapbox.com/mapbox-gl-js/style-spec/#sources-geojson-lineMetrics
* [darwin] Use FOUNDATION_EXTERN instead of plain externJason Wray2018-07-241-7/+7
| | | | FOUNDATION_EXTERN is an alias for extern in most cases, but also covers us in the event that a method could be mismangled by the compiler as C++ (when we want C-style mangling, for Obj-C compatibility).
* [ios, macos] Update minimum deployment versions to iOS 9, macOS 10.11 (#11776)Jason Wray2018-04-271-5/+5
| | | | | | | | | | | | | | | | | | | * [ios] Remove iOS 8 conditionals * [ios, macos] Bump pod deployment targets * [ios, macos] Add changelog entries * [ios, macos] Update docs * Remove unnecessary selector-based version checks * Update SQLite note * [ios, macos] Replace lightweight generics macros with direct use Lightweight generics for Foundation collections are available everywhere with the bump to iOS 9 and macOS 10.11. * Update deprecated macOS method
* [ios, macos] Clarified source optionsMinh Nguyễn2018-04-021-7/+46
| | | | Also moved options to the primary classes that use them.
* [ios, macos] Eliminated MGLAbstractShapeSourceMinh Nguyễn2018-04-021-4/+88
| | | | MGLComputedShapeSource is now a direct subclass of MGLSource and sibling of MGLShapeSource.
* [ios, macos] Removed redundant typedefMinh Nguyễn2018-01-081-5/+0
| | | Fixed a jazzy warning.
* [darwin] Abstract ShapeSource interfaceJesse Crocker2017-11-221-68/+2
|
* [ios, macos] noted how to update shape source (#10383)Jordan Kiley2017-11-031-1/+2
|
* [ios, macos] Expanded feature querying documentationMinh Nguyễn2017-03-141-6/+20
| | | | Also fixed a couple incorrect Swift method names on macOS.
* [macos, ios] query source featuresIvo van Dongen2017-03-101-0/+16
|
* [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-271-19/+19
|
* Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.1-masterMinh Nguyễn2017-01-261-1/+3
|\
| * [ios] changed URL -> url (#7841)Jordan Kiley2017-01-251-1/+1
| | | | | | Changed `@param URL` -> `@param url` in `MGLShapeSource.h` Fixes #7840
| * Clarify that clustering option is for shape sources (#7837)Jordan Kiley2017-01-251-0/+2
| | | | | | * [ios] Clarify that shape source needed for clustering. Fixes #7821.
* | Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.7Minh Nguyễn2017-01-161-1/+77
|\ \ | |/
| * [ios, macos] Note that MGLShapeSource.shape must be set on main thread (#7687)Minh Nguyễn2017-01-121-0/+3
| | | | | | | | | | | | | | | | * Add Clarification for modifying ShapeCollections Spinoff task from https://github.com/mapbox/mapbox-gl-native/issues/7622 * update wording for both get/set, remove whitespace
| * [ios, macos] Add convenience initializers to shape source (#7665)Jesse Bounds2017-01-111-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds two new convenience initializers to MGLShapeSource: -initWithIdentifier:features:options: takes an array of shape objects that conform to MGLFeature, inserts them in a shape collection feature and creates a source with that shape. -initWithIdentifier:shapes:options does the same but with concrete MGLShape objects that get added to a shape collection. Throw an exception if an shape source is created with the features initializer but is sent an array of features that contains something that is not actually an object that conforms to the feature protocol. Updates to geojson data guide Qualify APIs that take arrays of shapes that are features
| * [ios, macos] Make MGLMapView.style property nullable (#7664)Minh Nguyễn2017-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Made MGLMapView.style property nullable MGLMapView’s style property is now nullable (optional in Swift). The property is set to nil while the style loads and in the event that the style has failed to load. * [ios, macos] Switch to delegate method * [macos] Create MGLMapView programmatically for layer tests When MGLMapView is created via a nib, -initWithCoder: is called, causing styleURL to be set to nil, in turn causing the default Streets style to be loaded, fooling MGLStyleLayerTests into thinking one-line has been loaded. Instead, create MGLMapView programmatically, passing the intended style URL into the initializer, preventing Streets from being loaded.
| * [ios, macos] Compare source options to specsMinh Nguyễn2017-01-041-0/+20
| |
| * [ios, macos] Insert example code in original headers (#7569)Minh Nguyễn2017-01-041-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Removed extraneous code fences * [ios] Streamlined example delimiters Use test method names as names of example blocks and test method documentation comments as front matter for examples. Set off example blocks using a syntax similar to playground markup syntax. Avoid hard-coding indentation levels. Trigger Xcode build error when an error occurs in the script. * [ios] Removed platform-specific code from examples * [ios] Fixed logic error The comment said 200 while the code said 1,500. * [ios] Formalize build phase input * [ios] Insert examples into original source documentation Rewrote the example code insertion script to work on the original source files and overwrite any existing code examples on the same symbols. The script uses SourceKitten to find the documentation comment for the symbol named by the test method. Replaced the Run Script build phase that runs the example code insertion script with a make rule that runs the same script. Inlined skeleton examples minus the contents of the code blocks. * [ios] Fixed syntax error * [ios] Ran ios-add-examples-to-docs * [ios] Avoid touching unchanged headers * [ios] Refactored example insertion script * [ios] Point jazzy at original sources * [ios] Invoke SourceKitten only once * [ios] Look for methods as well as properties * [ios] Thoroughly search for code blocks in doc comments Refactored the example code insertion script to index test methods by their names, then recursively search the SourceKitten output for documentation comments that contain Swift code blocks, replacing each code block with the associated test method body. * [ios, macos] Enabled example insertion for macOS The example code insertion script is now platform-agnostic. * [ios, macos] Fixed documentation example tests Set the map view’s style to a minimal local JSON file. Wait for the style to finish loading before running each test. Corrected CGVector type. * [ios, macos] Dry run mode The output of this mode isn’t a good indicator of whether any files would’ve needed to be changed, because the presence of a conditional compilation block in one of the test methods means this script would always change and revert the corresponding comment. * [ios] Fixed test failure The iOS implementation of MGLMapView tries to show the Streets style by default even if no access token has been set. Avoid a race condition and frequent test failure by specifying the minimal style on initialization. * [ios, macos] Ensure SourceKitten is installed before inserting example code * [ios, macos] Tear down map view after each test Keep map views from previous tests from hanging around, potentially obscuring the result of a subsequent test. Set the access token to a bogus token upfront for all style layer tests. Unified MGLStyle usage within MGLStyleTests. * [ios, macos] Reinsert examples after generating runtime styling headers
| * [ios] Add inline examples in documentation (#7337)Eric Wolfe2016-12-211-0/+3
| |
* | [build] add -fvisibility=hidden to macOS dynamic framework and export ↵Konstantin Käfer2017-01-041-6/+8
|/ | | | required symbols
* [ios, macos] Simplify MGLSource and subclasses (#7377)Minh Nguyễn2016-12-131-39/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [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] Expanded source documentationMinh Nguyễn2016-12-101-11/+16
| | | | Also fixed a few stray references to GeoJSON sources.
* [ios, macos] Rename MGLGeoJSONSource to MGLShapeSource (#7334)Jesse Bounds2016-12-091-0/+145