Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

175
Vistas
Access geometry coordinates with Mapbox expressions somehow?

Every now and then I encounter a code like this:

var mapboxDrawStylesCustom = [
    {
      'id': 'custom-point-inactive',
      'type': 'circle',
      'filter': ['all',
        ['==', 'active', 'false'],
        ['==', '$type', 'Point'],
        ['==', 'meta', 'feature'],
        ['!=', 'mode', 'static']
      ],
      'paint': paintPropertyPoint
    }
]

I wonder about '$type' accessor here. Like obviously it allows to grab the type of geometry. But I haven't seen it mentioned anywhere in the docs. I personally need to access latitude/longitude of the Point geometry. According to documentation it is not something that Mapbox supports. However is it maybe possible somehow using this kind of dollar-sign syntax?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

$type is an older, deprecated expression. Its modern successor is ['geometry-type']: https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/#geometry-type

AFAIK the older syntax doesn't give you extra access to anything. So, no, you can't access geometry coordinates that way.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda