Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[ios, macos] Updated MGLFeature ID documentation
Browse files Browse the repository at this point in the history
Since #5514, feature IDs may be integers, unsigned integers, floating-point numbers, or strings, not just unsigned integers.
  • Loading branch information
1ec5 authored Jul 10, 2016
1 parent d076612 commit 8ca8e2c
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions platform/darwin/src/MGLFeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,23 @@ NS_ASSUME_NONNULL_BEGIN
An object that uniquely identifies the feature in its containing
<a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources">tile source</a>.
The value of this property is currently always an `NSNumber` object but may in
the future be an instance of another class, such as `NSString`.
The identifier corresponds to the
<a href="https://github.com/mapbox/vector-tile-spec/tree/master/2.1#42-features">feature identifier</a>
(`id`) in the tile source. If the source does not specify the feature’s
identifier, the value of this property is `nil`.
identifier, the value of this property is `nil`. If specified, the identifier
may be an integer, floating-point number, or string. These data types are
mapped to instances of the following Foundation classes:
<table>
<thead>
<tr><th>In the tile source</th><th>This property</th></tr>
</thead>
<tbody>
<tr><td>Integer</td> <td><code>NSNumber</code> (use the <code>unsignedLongLongValue</code> or <code>longLongValue</code> property)</td></tr>
<tr><td>Floating-point number</td> <td><code>NSNumber</code> (use the <code>doubleValue</code> property)</td></tr>
<tr><td>String</td> <td><code>NSString</code></td></tr>
</tbody>
</table>
For details about the identifiers used in most Mapbox-provided styles, consult
the
Expand Down

0 comments on commit 8ca8e2c

Please sign in to comment.