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

243
Vistas
Showing more details ons leaflet map

Currently i'm implementing a leaflet map that serves map data from our own OSM server.

During the implementation I noticed that the details on the maps are not clearly visible. Street names are unclear and walking paths do not stand out.

We currently support a zoom level of 17. However, the tiles received are of high quality and show much more detail than leaflet does. If I zoom in further, the tiles unfortunately turn gray.

An implementation with OpenLayers looks clearer.

Is there a setting that solves this or that allows you to zoom in without showing gray tiles? I thought this was maxNativeZoom but if i put this field on 17, it still tries to show zoom level 18 tiles.

enter image description here

const osmLayer = new L.TileLayer(osmUrl,
    {
        attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
    });

const element = elemId[0].className + "-" + mapId;

const map = new L.Map(element,
    {
        maxZoom: 22,
        maxNativeZoom: 17,
        minZoom: 9
    });

map.addLayer(osmLayer);

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

0

I just moved the zoom settings to the tileLayer and that seems to work. The settings are properties of the tileLayer:

const osmLayer = new L.TileLayer(osmUrl,
    {
        maxZoom: 20,
        maxNativeZoom: 17,
        minZoom: 9,
        attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
    });

const element = elemId[0].className + "-" + mapId;

const map = new L.Map(element);

map.addLayer(osmLayer);

return map;
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