Added new layers and sources properties to MGLStyle that contain all the style’s layers and sources, respectively. These properties are KVC-compliant with all the mutable to-many methods. Layers are ordered from topmost to bottommost, for consistency with Cocoa APIs where front/first means top and back/last means bottom.
Also added storage for mbgl::style::Source in MGLSource proper for wrapping AnnotationSource. Until the style finishes loading, its name property is set to nil.
Fixes#6003.
When a source or layer is removed transfer ownership back to the
caller so it can (optionally) take it. Preserve the behavior that
removing a CustomLayer triggers deinitialization. Deinitialize all
custom layers when a style is destroyed in case those layers are not
explicitly removed.
When a source or layer is removed transfer ownership back to the
caller so it can (optionally) take it. Preserve the behavior that
removing a CustomLayer triggers deinitialization. Deinitialize all
custom layers when a style is destroyed in case those layers are not
explicitly removed.
Implemented observer callbacks so the style knows when the source’s attribution changes and the map knows when the style’s attribution changes. Also implemented a getter for a tile source’s attribution.
Fixes#2723.
queryPointAnnotations() accepts a screen rectangle instead of a geographic bounding box, so marker hit testing works at the edges of a rotated, tilted map view.
Fixes#5151.
- puts function definitions in a namespace ... {} rather than using namespace ...;
- remove trailing whitespace
- add trailing newline
- protect SQL statements from being formatted by clang-format
Together with MapDebugOptions::Collision, provides "wireframe" rendering
output so all drawn objects are visible. This mode ignores the line
width, background and fill colors for better visualization.
Fixes#4359.
Added an API to get a camera that you can pass into -[MGLMapView setCamera:] that fits the given coordinate bounds, by analogy with -[MKMapView regionThatFits:] or -[MKMapView mapRectThatFits:edgePadding:].
Added mbgl::Map::getCameraOptions() for getting the current camera options more conveniently.