user2091757
user2091757

Reputation: 37

How to get tag properties from OSM in mapbox gl

map.on('click', 'building', function (e) {
    console.log(e.features);
});

I need to add some properties to the features object. Specifically the website and description

Upvotes: 1

Views: 198

Answers (1)

Steve Bennett
Steve Bennett

Reputation: 126457

You can see the available properties by consulting the Mapbox Streets layer reference. The attributes you seek are not present, so you will have to use either some other source of vector tiles that contains them (possibly OpenMapTiles), or create your own.

Upvotes: 1

Related Questions