Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

169
Views
How to specify altitude for a circle or symbol layer in Mapbox?

I have two layers built on FeatureCollection GeoJSON data. One of them is of type circle and the other is symbol. Here they are:

enter image description here

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.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

There is no support for setting elevation on symbol layers. See https://github.com/mapbox/mapbox-gl-js/issues/3993 and https://github.com/mapbox/mapbox-gl-js/issues/10483

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!