{"id":28576943,"url":"https://github.com/maptiler/maptiler-qml-demo","last_synced_at":"2025-06-11T00:08:20.602Z","repository":{"id":50537460,"uuid":"170304683","full_name":"maptiler/maptiler-qml-demo","owner":"maptiler","description":"MapTiler QML Demo","archived":false,"fork":false,"pushed_at":"2022-07-29T22:55:57.000Z","size":4,"stargazers_count":7,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-15T03:19:49.372Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"QML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maptiler.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-12T11:13:16.000Z","updated_at":"2023-08-18T11:45:30.000Z","dependencies_parsed_at":"2022-09-10T04:04:44.722Z","dependency_job_id":null,"html_url":"https://github.com/maptiler/maptiler-qml-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maptiler%2Fmaptiler-qml-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maptiler%2Fmaptiler-qml-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maptiler%2Fmaptiler-qml-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maptiler%2Fmaptiler-qml-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maptiler","download_url":"https://codeload.github.com/maptiler/maptiler-qml-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maptiler%2Fmaptiler-qml-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259172986,"owners_count":22816560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-11T00:08:20.055Z","updated_at":"2025-06-11T00:08:20.588Z","avatar_url":"https://github.com/maptiler.png","language":"QML","funding_links":[],"categories":[],"sub_categories":[],"readme":"MapTiler QML Demo\n=================\nThis simple application demonstrates using [MapTiler Cloud](https://www.maptiler.com/cloud/) tile hosting inside Qt.\n\nApplication is splitted into three tabs demonstrating three ways how to use MapTiler.\n\nFirst we need to define our hostingKey property\n```\nproperty string hostingKey: \"\u003cyour-map-hosting-key-belongs-here\u003e\"\n```\n\n--------------------------------------------\n\n## Using Qt Location Mapbox GL vector styles\n\nTo use vector styles we will use Mapbox GL Qt Location plugion. Add Map element and insert mapboxgl plugin. Now we have to set maptiler styles, pass the appropriate value to mapboxgl.mapping.additional_style_urls plugin parameter.\n\n```\nPlugin {\n    id: mapPluginVector\n    name: \"mapboxgl\"\n\n    PluginParameter {\n        name: \"mapboxgl.mapping.additional_style_urls\"\n        value: \"https://api.maptiler.com/maps/streets/style.json?key=\"\n               + hostingKey\n    }\n}\n\nMap {\n    id: mapVector\n\n    anchors.fill: parent\n    plugin: mapPluginVector\n    zoomLevel: 14\n}\n```\n-------------------------------------------\n## Using Qt Location Mapbox GL raster tiles\n\nTo achieve rendering raster tiles we have to set maptiler styles and define new raster source and raster layer. Pass the appropriate url to source url property.\n\n```\nPlugin {\n    id: mapPluginRaster\n    name: \"mapboxgl\"\n\n    PluginParameter {\n        name: \"mapboxgl.mapping.additional_style_urls\"\n        value: \"https://api.maptiler.com/maps/hybrid/style.json?key=\"\n               + hostingKey\n    }\n}\n\nMap {\n    id: mapRaster\n\n    anchors.fill: parent\n    plugin: mapPluginRaster\n    zoomLevel: 14\n\n}\n```\n\n--------------------------------------------\n\n## Embedding web map browser using WebEngine\n\nWe can also use embedded browser view. By using WebEngineView we use Chromium, setup is as simple as passing correct url to broser.\nIf you are unable to use WebEngine, simply swap WebEngine with WebView to use native platform browser.\n\n```\nWebEngineView {\n    anchors.fill: parent\n    url: \"https://api.maptiler.com/maps/streets/?key=\"\n                     + hostingKey + \"#1.22/-0.00000/0.00000\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaptiler%2Fmaptiler-qml-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaptiler%2Fmaptiler-qml-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaptiler%2Fmaptiler-qml-demo/lists"}