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

369
Views
Cómo hacer que Mapbox GL JS cargue todos los mosaicos en la extensión del mapa

Estoy tratando de usar algunos mosaicos vectoriales de la Oficina del Censo de EE. UU. alojados en ArcGIS en línea ( https://gis.data.census.gov/arcgis/rest/services/Hosted/VT_2010_140_00_PY_D1/VectorTileServer ) con Mapbox GL JS.

No parece que se estén cargando todos los mosaicos para cubrir la extensión del mapa. ¿Hay alguna opción que deba pasar? No estoy seguro de si se trata de un problema de Mapbox o ArcGIS Vector Tile Service.

Captura de pantalla 1 : delineé los espacios "vacíos" en rojo

Captura de pantalla 2 : vea cómo se carga el área roja de la Captura de pantalla 1 cuando muevo el mapa hacia el este

 mapboxgl.accessToken = MY_TOKEN; const map = new mapboxgl.Map({ container: 'mapid', // container ID style: 'mapbox://styles/mapbox/light-v10', // style URL projection: 'albers', center: [-97, 39], // starting position minZoom: 6, zoom: 6 // starting zoom }); map.on('load', () => { map.addSource("ct2010", { type: "vector", tiles: ["https://gis.data.census.gov/arcgis/rest/services/Hosted/VT_2010_140_00_PY_D1/VectorTileServer/tile/{z}/{y}/{x}.pbf"], minzoom: 6, promoteId: "GEOID" // promote field to be used as a foreign key }) // Add a new layer to visualize the polygon. map.addLayer({ 'id': 'cdfi', 'type': 'fill', 'source': 'ct2010', // reference the data source "source-layer": "CensusTract", 'layout': { }, 'paint': { 'fill-color': 'rgb(13,40,75)', 'fill-opacity': 0.5 } }); });

EDITAR: Creo que mi problema estaba tratando de usar la proyección de Albers. Eliminar esa opción resuelve mi problema. Tal vez relacionado con https://github.com/mapbox/mapbox-gl-js/issues/11284

about 4 years ago · Santiago Gelvez
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!