mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.37k stars 1.33k forks source link

Missing icons on Qt 5.15 #16545

Open afendin opened 3 years ago

afendin commented 3 years ago

Until now I had used mapbox://styles/mapbox/navigation-preview-night-v2 style, which was working fine. But when I changed my style to "Navigation"(which is default template from Mapbox Studio), I got following warnings:

[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [3]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [3]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [3]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [3]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [2]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [2]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [2]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [2]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [2]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [2]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [3]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [3]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [3]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [2]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [1]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{QSGRenderThread}[ParseStyle]: [1]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."

And my map does not have half of icons on it. enter image description here

Here's my code sample:

import QtQuick 2.15
import QtQuick.Window 2.15
import QtLocation 5.15
import QtPositioning 5.15

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")

    Map {
        anchors.fill: parent

        zoomLevel: 15
        plugin: Plugin {
            name: "mapboxgl"

            PluginParameter {
                name: "mapboxgl.access_token"
                value: "pk.eyJ1IjoiYW1pcmFmZW5kaW4iLCJhIjoiY2p3dWpxa2c0MGs4aTN5cXpnbGx0Z2liaiJ9.bhSGga4rMM44DhZ-JKigfg
            }

            PluginParameter {
                name: "mapboxgl.mapping.additional_style_urls"
                value: "mapbox://styles/amirafendin/ckgt1luiu1qud19pxq6mv8zyo"
            }
        }

        activeMapType: supportedMapTypes[0]
    }
}
afendin commented 3 years ago

To make it work had to replace 

["get", "filterrank"]
["get", "sizerank"]
["get", "symbolrank"]
["get", "len"]
["get", "reflen"]
["get", "layer"]

in filters with

["to-number", ["get", "filterrank"]]
etc...
M-Kerr commented 3 years ago

I have the ParseStyle issue as well after using a custom navigation map url.

j-mar commented 3 years ago

Number parsing appears to have broken with Qt 5.15. I've implemented a fix to the Mapbox library here: https://github.com/mapbox/mapbox-gl-native/pull/16562

AndyShawQt commented 3 years ago

I am also seeing this, but the suggested fix does not seem to be helping in this case, the errors:


[ WARNING ]  "{unknown}[ParseStyle]: [3]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{unknown}[ParseStyle]: [3]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{unknown}[ParseStyle]: [3]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{unknown}[ParseStyle]: [3]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{unknown}[ParseStyle]: [2]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{unknown}[ParseStyle]: [2]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{unknown}[ParseStyle]: [2]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{unknown}[ParseStyle]: [2]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{unknown}[ParseStyle]: [3]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{unknown}[ParseStyle]: [3]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{unknown}[ParseStyle]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{unknown}[ParseStyle]: [2]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{unknown}[ParseStyle]: [1]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."
[ WARNING ]  "{unknown}[ParseStyle]: [1]: Expected arguments of type (number, number) | (string, string), but found (value, number) instead."

still appear with it in place.

K1ngjulien commented 2 years ago

any update on this? I'm using a custom style url on Qt 5.15.2 and still get the same "ParseStyle" errors. Is this fixed in any newer releases?

akontsevich commented 2 years ago

I have same warnings.

zimml commented 2 years ago

Same issue for me.