I have two layers built on FeatureCollection
GeoJSON data. One of them is of type circle
and the other is symbol
. Here they are:
Thing is, as you can see in our project we use 3D buildings on the map, and we need our objects to be at a certain altitude above the ground. The question is, how to do this in Mapbox?
Here's what I've tried:
GeoJSON feature coordinates
An OPTIONAL third-position element SHALL be the height in meters above or below the WGS 84 reference ellipsoid. In the absence of elevation values, applications sensitive to height or depth SHOULD interpret positions as being at local ground or sea level. — GeoJSON spec.
I've tried setting the third argument for a feature's geometry, which is a point, but it didn't help. Looks like the third value is just being ignored.
return {
type: 'Feature',
id: l.id,
geometry: {
type: 'Point',
coordinates: [l.coordinates.lng, l.coordinates.lat, 50]
}
}
circle-translate
The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
I've tried setting this but the result looked super weird, it didn't look like a normal elevation.
Example
I've modified an example from Mapbox so you can play around with this — here.