Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QT QML - Changing Mapbox font size

QT QML - Changing Mapbox font size

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 368 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kyounkin
    wrote on last edited by
    #1

    I'm using QT 5.12.4 with the MapboxGl plugin and I'm trying to figure out how to make the street names display in a larger font but I'm very confused about how to specify a text size. I need to change the size dynamically so using a predefined style is not going to meet the requirements.

    The two confusing aspects are that Mapbox's documentation has to be translated into "MapParameters" for QML and I'm clueless as to what exactly is needed to change the text size. Between reading through the documentation and playing with the mapbox studio it seems like I need to modify the "road-label" layer. If anyone has some sample code of how to change the text size I would really appreciate it if you could share.

    https://docs.mapbox.com/mapbox-gl-js/style-spec/#layout-symbol-text-size

    MapParameter 
    {
        type: "layout"
    
        property var layer: "road-label"
        property var textSize: 20
    }
    
    1 Reply Last reply
    0
    • K Offline
      K Offline
      kyounkin
      wrote on last edited by
      #2

      In case anyone needs the solution, I posted it here:
      https://stackoverflow.com/questions/59446043/qt-qml-changing-mapbox-font-size

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved