oscarfonts / mapbox-gl-cordova-offline

Offline vector maps in Cordova using Mapbox GL JS
Other
60 stars 37 forks source link

Missing street names over z14? #27

Closed petrot closed 6 years ago

petrot commented 6 years ago

Hi,

Over zoom level 14 (?) some street names stacked invisible. With the official openmaptiles app the labels are working. I'm using the same mbtiles file and style.json as the app (I have extracted the style contents from the apk and read the file url with adb logcat).

Is it a bug, or the downloaded file doesn't contain all data?

I recorded a video: https://youtu.be/dvKBL9vZHfo

My config for the labels:

{
      "id": "highway-name-minor",
      "type": "symbol",
      "source": "openmaptiles",
      "source-layer": "transportation_name",
      "minzoom": 13,

      "filter": [
        "all",
        ["==", "$type", "LineString"],
        ["in", "class", "minor", "service", "track"]
      ],
      "layout": {
        "text-size": {
          "base": 1,
          "stops": [[13, 12], [14, 13]]
        },
        "text-font": ["Klokantech Noto Sans Regular"],
        "text-field": "{name}",
        "symbol-placement": "line",
        "text-rotation-alignment": "map"
      },
      "paint": {
        "text-halo-blur": 0.5,
        "text-color": "#765",
        "text-halo-width": 1
      }
    },
    {
      "id": "highway-name-major",
      "type": "symbol",
      "source": "openmaptiles",
      "source-layer": "transportation_name",
      "minzoom": 12.2,

      "filter": ["in", "class", "primary", "secondary", "tertiary", "trunk"],
      "layout": {
        "text-size": {
          "base": 1,
          "stops": [[13, 12], [14, 13]]
        },
        "text-font": ["Klokantech Noto Sans Regular"],
        "text-field": "{name}",
        "symbol-placement": "line",
        "text-rotation-alignment": "map"
      },
      "paint": {
        "text-halo-blur": 0.5,
        "text-color": "#765",
        "text-halo-width": 1
      }
    },
oscarfonts commented 6 years ago

There is nothing in this repo that deals with labelling or alters it.

If the street is shown, the dataset is including the street name. Style also seems to be OK.

So I guess the difference in label placement is caused by different library versions. We are using the Javascript version of Mapbox GL JS (0.47.0), while the openmaptiles app may be using another one (the native one?).

petrot commented 6 years ago

@oscarfonts ok, thanks!