"light-cocoa-doc":"An `MGLLight` object represents the light source for extruded geometries in `MGLStyle`.\n\n#### Related examples\nSee the <a href=\"https://docs.mapbox.com/ios/maps/examples/light-example/\">Adjust light of 3D buildings</a> to learn how to create and modify the light source for 3D geometries.",
"light-cocoa-doc":"An `MGLLight` object represents the light source for extruded geometries in `MGLStyle`.\n\n### Example\n```swift\n```\n\n#### Related examples\nSee the <a href=\"https://docs.mapbox.com/ios/maps/examples/light-example/\">Adjust light of 3D buildings</a> to learn how to create and modify the light source for 3D geometries.",
"light":{
"position":{
"doc":"Position of the `MGLLight` source relative to lit (extruded) geometries, in a `MGLSphericalPosition` struct [radial coordinate, azimuthal angle, polar angle] where radial indicates the distance from the center of the base of an object to its light, azimuthal indicates the position of the light relative to 0° (0° when `MGLLight.anchor` is set to `MGLLightAnchorViewport` corresponds to the top of the viewport, or 0° when `MGLLight.anchor` is set to `MGLLightAnchorMap` corresponds to due north, and degrees proceed clockwise), and polar indicates the height of the light (from 0°, directly above, to 180°, directly below).",
This option only affects point features within an `MGLShapeSource` object; it
is ignored when creating an `MGLComputedShapeSource` object.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/clustering/">Cluster point data</a> and <a href="https://docs.mapbox.com/ios/maps/examples/clustering-with-images/">Use images to cluster point data</a> examples to learn how to cluster point data with this `MGLShapeSourceOption`.
@note You are responsible for getting permission to use the map data and for
ensuring that your use adheres to the relevant terms of use.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/simple-map-view/">
Simple map view</a> example to learn how to initialize a basic `MGLMapView`.
@@ -203,7 +203,7 @@ MGL_EXPORT IB_DESIGNABLE
(`mapbox://styles/{user}/{style}`), or a path to a local file relative
to the application’s resource path. Specify `nil` for the default style.
@return An initialized map view.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/custom-style/">
Apply a style designed in Mapbox Studio</a> example to learn how to
@@ -267,7 +267,7 @@ MGL_EXPORT IB_DESIGNABLE
If you want to modify the current style without replacing it outright, or if
you want to introspect individual style attributes, use the `style` property.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/switch-styles/">
Switch between map styles</a> example to learn how to change the style of
@@ -424,13 +424,13 @@ MGL_EXPORT IB_DESIGNABLE
/**
The object that this map view uses to start and stop the delivery of location-related
updates.
To receive the current user location, implement the `-[MGLMapViewDelegate mapView:didUpdateUserLocation:]`
and `-[MGLMapViewDelegate mapView:didFailToLocateUserWithError:]` methods.
If setting this property to `nil` or if no custom manager is provided this property
is set to the default location manager.
`MGLMapView` uses a default location manager. If you want to substitute your own
location manager, you should do so by setting this property before setting
`showsUserLocation` to `YES`. To restore the default location manager,
@@ -454,7 +454,7 @@ MGL_EXPORT IB_DESIGNABLE
`NSLocationAlwaysUsageDescription` in its `Info.plist` to satisfy the
requirements of the underlying Core Location framework when enabling this
property.
If you implement a custom location manager, set the `locationManager` before
calling `showsUserLocation`.
*/
@@ -481,7 +481,7 @@ MGL_EXPORT IB_DESIGNABLE
Changing the value of this property updates the map view with an animated
transition. If you don’t want to animate the change, use the
`-setUserTrackingMode:animated:` method instead.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/user-location-annotation/">
Customize the user location annotation</a> to learn how to customize the
@@ -698,12 +698,12 @@ MGL_EXPORT IB_DESIGNABLE
Changing the center coordinate centers the map on the new coordinate without
changing the current zoom level.
@param coordinate The new center coordinate for the map.
@param animated Specify `YES` if you want the map view to scroll to the new
location or `NO` if you want the map to display the new location
immediately.
@note The behavior of this method is undefined if called in response to
`UIApplicationWillTerminateNotification`.
*/
@@ -718,7 +718,7 @@ MGL_EXPORT IB_DESIGNABLE
@param animated Specify `YES` if you want the map view to animate scrolling and
zooming to the new location or `NO` if you want the map to display the new
location immediately.
@note The behavior of this method is undefined if called in response to
`UIApplicationWillTerminateNotification`.
*/
@@ -735,7 +735,7 @@ MGL_EXPORT IB_DESIGNABLE
@param animated Specify `YES` if you want the map view to animate scrolling,
zooming, and rotating to the new location or `NO` if you want the map to
display the new location immediately.
@note The behavior of this method is undefined if called in response to
`UIApplicationWillTerminateNotification`.
*/
@@ -753,7 +753,7 @@ MGL_EXPORT IB_DESIGNABLE
zooming, and rotating to the new location or `NO` if you want the map to
display the new location immediately.
@param completion The block executed after the animation finishes.
@note The behavior of this method is undefined if called in response to
`UIApplicationWillTerminateNotification`.
*/
@@ -855,7 +855,7 @@ MGL_EXPORT IB_DESIGNABLE
Changing the value of this property updates the receiver immediately. If you
want to animate the change, call `-setVisibleCoordinateBounds:animated:`
instead.
If a longitude is less than −180 degrees or greater than 180 degrees, the
visible bounds straddles the antimeridian or international date line. For
example, if both Tokyo and San Francisco are visible, the visible bounds might
@@ -866,7 +866,7 @@ MGL_EXPORT IB_DESIGNABLE
/**
Changes the receiver’s viewport to fit the given coordinate bounds,
optionally animating the change.
To bring both sides of the antimeridian or international date line into view,
specify some longitudes less than −180 degrees or greater than 180 degrees. For
example, to show both Tokyo and San Francisco simultaneously, you could set the
@@ -881,7 +881,7 @@ MGL_EXPORT IB_DESIGNABLE
/**
Changes the receiver’s viewport to fit the given coordinate bounds and
optionally some additional padding on each side.
To bring both sides of the antimeridian or international date line into view,
specify some longitudes less than −180 degrees or greater than 180 degrees. For
example, to show both Tokyo and San Francisco simultaneously, you could set the
@@ -898,7 +898,7 @@ MGL_EXPORT IB_DESIGNABLE
/**
Changes the receiver’s viewport to fit all of the given coordinates and
optionally some additional padding on each side.
To bring both sides of the antimeridian or international date line into view,
specify some longitudes less than −180 degrees or greater than 180 degrees. For
example, to show both Tokyo and San Francisco simultaneously, you could set the
@@ -917,7 +917,7 @@ MGL_EXPORT IB_DESIGNABLE
/**
Changes the receiver’s viewport to fit all of the given coordinates and
optionally some additional padding on each side.
To bring both sides of the antimeridian or international date line into view,
specify some longitudes less than −180 degrees or greater than 180 degrees. For
example, to show both Tokyo and San Francisco simultaneously, you could set the
@@ -978,7 +978,7 @@ MGL_EXPORT IB_DESIGNABLE
@param animated Specify `YES` if you want the map view to animate the change to
the new viewpoint or `NO` if you want the map to display the new viewpoint
immediately.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/camera-animation/">
Camera animation</a> example to learn how to trigger an animation that
@@ -997,7 +997,7 @@ MGL_EXPORT IB_DESIGNABLE
@param function A timing function used for the animation. Set this parameter to
`nil` for a transition that matches most system animations. If the duration
is `0`, this parameter is ignored.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/camera-animation/">
Camera animation</a> example to learn how to create a timed animation that
@@ -1023,7 +1023,7 @@ MGL_EXPORT IB_DESIGNABLE
/**
Moves the viewpoint to a different location with respect to the map with an
optional transition duration and timing function.
@param camera The new viewpoint.
@param duration The amount of time, measured in seconds, that the transition
animation should take. Specify `0` to jump to the new viewpoint
@@ -1112,7 +1112,7 @@ MGL_EXPORT IB_DESIGNABLE
with zoom level as high (close to the ground) as possible while still
including the entire coordinate bounds. The camera object uses the current
direction and pitch.
@note The behavior of this method is undefined if called in response to
`UIApplicationWillTerminateNotification`; you may receive a `nil` return value
depending on the order of notification delivery.
@@ -1122,7 +1122,7 @@ MGL_EXPORT IB_DESIGNABLE
/**
Returns the camera that best fits the given coordinate bounds, with the specified camera,
optionally with some additional padding on each side.
@param camera The camera that the return camera should adhere to. All values
on this camera will be manipulated except for pitch and direction.
@param bounds The coordinate bounds to fit to the receiver’s viewport.
@@ -1142,7 +1142,7 @@ MGL_EXPORT IB_DESIGNABLE
/**
Returns the camera that best fits the given shape, with the specified camera,
optionally with some additional padding on each side.
@param camera The camera that the return camera should adhere to. All values
on this camera will be manipulated except for pitch and direction.
@param shape The shape to fit to the receiver’s viewport.
@@ -1151,7 +1151,7 @@ MGL_EXPORT IB_DESIGNABLE
@return A camera object centered on the shape's center with zoom level as high
(close to the ground) as possible while still including the entire shape. The
initial camera's pitch and direction will be honored.
@note The behavior of this method is undefined if called in response to
`UIApplicationWillTerminateNotification`; you may receive a `nil` return value
depending on the order of notification delivery.
@@ -1166,10 +1166,10 @@ MGL_EXPORT IB_DESIGNABLE
@param direction The direction of the viewport, measured in degrees clockwise from true north.
@param insets The minimum padding (in screen points) that would be visible
around the returned camera object if it were set as the receiver’s camera.
@return A camera object centered on the shape's center with zoom level as high
@return A camera object centered on the shape's center with zoom level as high
(close to the ground) as possible while still including the entire shape. The
camera object uses the current pitch.
@note The behavior of this method is undefined if called in response to
`UIApplicationWillTerminateNotification`; you may receive a `nil` return value
depending on the order of notification delivery.
@@ -1245,7 +1245,7 @@ MGL_EXPORT IB_DESIGNABLE
@param point The point to convert.
@param view The view in whose coordinate system the point is expressed.
@return The geographic coordinate at the given point.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/point-conversion/">
Point conversion</a> example to learn how to convert a `CGPoint` to a map
@@ -1264,7 +1264,7 @@ MGL_EXPORT IB_DESIGNABLE
belong to the same window as the map view.
@return The point (in the appropriate view or window coordinate system)
corresponding to the given geographic coordinate.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/point-conversion/">
Point conversion</a> example to learn how to convert a map coordinate to a
@@ -1275,7 +1275,7 @@ MGL_EXPORT IB_DESIGNABLE
/**
Converts a rectangle in the given view’s coordinate system to a geographic
bounding box.
If the returned coordinate bounds contains a longitude is less than −180 degrees
or greater than 180 degrees, the bounding box straddles the antimeridian or
international date line.
@@ -1289,7 +1289,7 @@ MGL_EXPORT IB_DESIGNABLE
/**
Converts a geographic bounding box to a rectangle in the given view’s
coordinate system.
To bring both sides of the antimeridian or international date line into view,
specify some longitudes less than −180 degrees or greater than 180 degrees. For
example, to show both Tokyo and San Francisco simultaneously, you could set the
@@ -1341,7 +1341,7 @@ MGL_EXPORT IB_DESIGNABLE
@param annotation The annotation object to add to the receiver. This object
must conform to the `MGLAnnotation` protocol. The map view retains the
annotation object.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/annotation-models/">
Annotation models</a> and <a href="https://docs.mapbox.com/ios/maps/examples/line-geojson/">
@@ -1412,7 +1412,7 @@ MGL_EXPORT IB_DESIGNABLE
annotation image object using the `-mapView:imageForAnnotation:` method.
@return An annotation image object with the given identifier, or `nil` if no
such object exists in the reuse queue.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/annotation-view-image/">
Add annotation views and images</a> example learn how to most efficiently
@@ -1479,14 +1479,14 @@ MGL_EXPORT IB_DESIGNABLE
The `animated` parameter determines whether the selection is animated including whether the map is
panned to bring the annotation into view, specifically:
| `animated` parameter | Effect |
|------------------|--------|
| `NO` | The annotation is selected, and the callout is presented. However the map is not panned to bring the annotation or callout into view. The presentation of the callout is NOT animated. |
| `YES` | The annotation is selected, and the callout is presented. If the annotation is not visible (or is partially visible) *and* is of type `MGLPointAnnotation`, the map is panned so that the annotation and its callout are brought into view. The annotation is *not* centered within the viewport. |
Note that a selection initiated by a single tap gesture is always animated.
@param annotation The annotation object to select.
@param animated If `YES`, the annotation and callout view are animated on-screen.
@@ -1499,7 +1499,7 @@ MGL_EXPORT IB_DESIGNABLE
:nodoc:
Selects an annotation and displays its callout view. This method should be
considered "alpha" and as such is liable to change.
@param annotation The annotation object to select.
@param moveIntoView If the annotation is not visible (or is partially visible) *and* is of type `MGLPointAnnotation`, the map is panned so that the annotation and its callout are brought into view. The annotation is *not* centered within the viewport. |
@param animateSelection If `YES`, the annotation's selection state and callout view's presentation are animated.
@@ -1577,7 +1577,7 @@ MGL_EXPORT IB_DESIGNABLE
@param point A point expressed in the map view’s coordinate system.
@return An array of objects conforming to the `MGLFeature` protocol that
represent features in the sources used by the current style.
#### Related examples
See the <a href="https://docs.mapbox.com/ios/maps/examples/select-layer/">
Select a feature within a layer</a> example to learn how to query an
@@ -1588,18 +1588,18 @@ MGL_EXPORT IB_DESIGNABLE
/**
Returns an array of rendered map features that intersect with a given point,
restricted to the given style layers.
This method returns all the intersecting features from the specified layers. To
filter the returned features, use the
`-visibleFeaturesAtPoint:inStyleLayersWithIdentifiers:predicate:` method. For
more information about searching for map features, see that method’s
documentation.
@param point A point expressed in the map view’s coordinate system.
@param styleLayerIdentifiers A set of strings that correspond to the names
of layers defined in the current style. Only the features contained in
@param styleLayerIdentifiers A set of strings that correspond to the names
of layers defined in the current style. Only the features contained in
these layers are included in the returned array.
@return An array of objects conforming to the `MGLFeature` protocol that
@return An array of objects conforming to the `MGLFeature` protocol that
represent features in the sources used by the current style.
Returns an array of rendered map features that intersect with the given
rectangle, restricted to the given style layers.
This method returns all the intersecting features from the specified layers. To
filter the returned features, use the
`-visibleFeaturesAtPoint:inStyleLayersWithIdentifiers:predicate:` method. For
more information about searching for map features, see that method’s
more information about searching for map features, see that method’s
documentation.
@param rect A rectangle expressed in the map view’s coordinate system.
@@ -1709,7 +1709,7 @@ MGL_EXPORT IB_DESIGNABLE
Returns an array of rendered map features that intersect with the given
rectangle, restricted to the given style layers and filtered by the given
predicate.
Each object in the returned array represents a feature rendered by the
current style and provides access to attributes specified by the relevant map
content sources. The returned array includes features loaded by
@@ -1758,7 +1758,7 @@ MGL_EXPORT IB_DESIGNABLE
inspectable in Interface Builder, or a manually constructed `NSURL`. This
approach also avoids layer identifer name changes that will occur in the
default style’s layers over time.
@note Layer identifiers are not guaranteed to exist across styles or different
versions of the same style. Applications that use this API must first set
the style URL to an explicitly versioned style using a convenience method
@@ -1766,7 +1766,7 @@ MGL_EXPORT IB_DESIGNABLE
inspectable in Interface Builder, or a manually constructed `NSURL`. This
approach also avoids layer identifer name changes that will occur in the
default style’s layers over time.
@param rect A rectangle expressed in the map view’s coordinate system.
@param styleLayerIdentifiers A set of strings that correspond to the names of
layers defined in the current style. Only the features contained in these
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.