'How to display custom building on mapbox-gl map

I wan't to display my own buildings on map(as in example). They should be static - my screen example

At screenshot you can see example with marker building(it moves on map move or zoom in/out)

My purpose - this view

I want to create map with isometric buildings, which can have different opacity



Solution 1:[1]

Take a look at: https://docs.mapbox.com/mapbox-gl-js/example/image-on-a-map/

Each of your building images should be added as a raster layer with the coordinates argument specifying the coordinate boundaries of the building:

map.addSource('building1', {
  'type': 'image',
  'url': 'building1.png',
  'coordinates': [
    [-80.425, 46.437],
    [-71.516, 46.437],
    [-71.516, 37.936],
    [-80.425, 37.936]
  ]
});

The images will automatically scale as you zoom in and out to maintain the correct coordinates.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 teddybeard