| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
| |
Added designated initializers to MGLStyleValue and friends. Restored custom equality and descriptions to MGLStyleFunction. Raise an exception if an unrecognized subclass of MGLStyleValue or MGLStyleValue itself is passed into a style attribute property.
|
| |
|
|
|
|
| |
MGLStyleValue is an umbrella class serving as a variant container for MGLStyleConstantValue and MGLStyleFunction. These classes use lightweight generics to indicate the underlying type. A templated C++ class concisely converts between mbgl::style::PropertyValue and MGLStyleValue.
|
| |
|
|
|
|
|
|
| |
MGLShape subclasses can now return NSDictionaries that represent the shapes' GeoJSON geometries. MGLFeature classes can now return NSDictionaries that represent the features as GeoJSON features. This makes it trivial to serialize iOS and macOS shapes and features into GeoJSON.
MGLFeature instances can also return a representation of themselves as an mbgl::Feature. This capability is used in a refactoring of the implementations of MGLGeoJSONSource to more efficiently transform MGLFeatures into mbgl::Features so they can be fed directly into mbgl::GeoJSONSource without having to round trip through NSJSONSerialization. The MGLFeature identifier is converted into the mbgl::identifier type based on the type of the identifier. The MGLFeature attributes are recursively converted into an mbgl::PropertyMap and each value is converted into one of the types that the PropertyMap's Value variant supports.
|
|
|
|
|
|
|
|
| |
This adds a features initializer to MGLGeoJSONSource. The initializer
takes shapes and converts them to JSON representation before passing
to core. This also adds methods to the MGLShape concrete subclasses
so that they can represent themselves in NSDictionary form suitable
for transforming to JSON (GeoJSON).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [ios, macos] possibility to set custom images to style
* [ios, macos] setImage:forName now supports MGLImage (UIImage/NSImage)
* [ios, macos] update documentation for setImage:forName: and removeImageForName:
* [ios, macos] rename method and fix prefix
* [ios, macos] change header visibility to project
* [ios, macos] update header imports
* [ios, macos] delete unnecessary whitespaces
* [ios, macos] remove unnecessary nil checks
* [ios, macos] delete unnecessary whitespaces
* [ios, macos] update documentation
* [ios, macos] make mgl_spriteImage a parameter-less instance method
* [ios, macos] add asserts
|
| |
|
|
|
|
| |
The name of each enumeration type no longer refers to the layer type that uses it.
|
|
|
|
|
|
| |
Example: <MGLStyle: 0x60800001e0a0; name = "Mapbox Dark", URL = "mapbox://styles/mapbox/dark-v9">
- Adds an internal `URL` property.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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] Removed support for CONTAINS operator
* [ios, macos] Removed CONTAINS test
|
| |
|
|
|
|
|
| |
Mildly decoupled the transformation from the style specification to the format required for iOS/macOS documentation so it’s harder for style specification references to other properties’ values to fall through the cracks.
Fixes #6541.
|
|
|
|
|
|
| |
Documentation for enum values landed in mapbox/mapbox-gl-style-spec#510.
This updates Android, iOS, and macOS documentation code gen scripts to capitalize on them.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- fixes #5959: MGLBaseStyleLayer docs
- fixes #5960: MGLSource & subclasses docs
- fixes #6467: concrete layer subclass docs
- move Core Graphics include
- slight code & template cleanups
- add ./documentation to git ignores
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* [ios, macos] Allow full hex colors in layer docs
CSS hexadecimal RGB syntax can contain all the hexadecimal digits, not just the decimal digits.
* [ios, macos] Parse colors with csscolorparser
|
|
|
| |
A new MGLTileSet class that wraps all available core Tileset options can be created and passed into the sources. The sources pass that tileset object along to core.
|
| |
|
|
|
|
| |
If the packs property is already populated, there’s no need to wait for a change notification.
|
|
|
|
|
|
| |
* [core, ios, android] Use `auto` value for properties with calculated defaults
* Fix render tests
|
|
|
|
|
| |
(#6408)
Also removes some dead code in MGLStyle.mm.
|
| |
|
|
|
| |
Adds several new translations to prevent data loss.
|
|
|
|
| |
-suspend and -resume are now presumed to be synchronous, even if technically they remain asynchronous under the hood.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
SDKs to use Map::update
This paves the way for updates to filter and layout properties to trigger a source reload, without each SDK having to participate in the implementation.
|
|
|
|
|
|
|
|
|
| |
Clang/Sourcekitten do not appear to like HTML tags in `@param` definitions.
Also:
- Wraps lines at 80 chars.
- Adds minimal docs for MGLGeoJSONSource so it will be seen by jazzy.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes a previous implementation of geojson options that used
a new type to transfer the data around. Added in its place is
an options API that takes an NSDictionary that works similarly to
NSAttributedString and many other Cocoa APIs that take options.
The options parser now expects the developer to send values of the
type noted in the documentation and it simply converts the NSNumber
to the correct type (integer, double, or bool) for mbgl. However, an
exception is raised if the value is not an NSNumber.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We convert NSNumbers (and NSStrings) to the appropriate mbgl value
so that we can use NSPredicates to describe mbgl filters we want
to apply to style layers at runtime.
This change fixes an issue where
the conversion from an NSNumber that represented a bool was not
recognized as such. encode(bool) returns a 'c' or 'b' on 32 bit and
64 bit systems respectively and objCType of an NSNumber representing
a bool always returns 'c'. Now the implementation checks for 'c'
always and NSNumbers representing bool don't fall through and
trigger the exception.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[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
|
| |
|
|
|
|
| |
Duplicate each color-typed property once per platform using conditional compilation macros. Let’s just hope we never have to throw CGColor into the mix.
|
| |
|
| |
|
|
|
|
| |
Also support unsetting enumeration-typed properties.
|