swift - MapBox MGLFeature identifier should be a unique identifier? -
i'm using mapbox , i'm getting features of building using following code:
let features = self.mapview.visiblefeatures(at: pointmapview) if features.count > 0 { let feature:mglfeature = features[0] print("feature.identifier:\(f.identifier)") }
everything works correctly, when print feature's identifier number 3, 4 , on. reading documentation of mglfeature, identifier:
"an object uniquely identifies feature in containing tile source value of property nsnumber object may in future instance of class, such nsstring.
the identifier corresponds feature identifier (id) in tile source. if source not specify feature’s identifier, value of property nil."
since identifier should unique, expect more complex number or string 3 or 4. why "simple" identifier?
Comments
Post a Comment