Web tiled layer

Loading

Code

import QtQuick 2.6
import Esri.ArcGISRuntime 100.3

Rectangle {
    id: rootRectangle
    clip: true
    width: 800
    height: 600

    // Map view UI presentation at top
    MapView {
        id: mapView

        anchors.fill: parent

        Map {
            Basemap {
                // Create a WebTiledLayer with a template URL, sub domains, and copyright information
                WebTiledLayer {
                    templateUrl: "http://{subDomain}.tile.stamen.com/terrain/{level}/{col}/{row}.png"
                    subDomains: ["a", "b", "c", "d"]
                    attribution: "Map tiles by <a href=\"http://stamen.com\">Stamen Design</a>, " +
                                 "under <a href=\"http://creativecommons.org/licenses/by/3.0\">CC BY 3.0</a>. " +
                                 "Data by <a href=\"http://openstreetmap.org\">OpenStreetMap</a>, " +
                                 "under <a href=\"http://www.openstreetmap.org/copyright\">ODbL</a>."
                }
            }

            // Set initial viewpoint
            ViewpointCenter {
                Point {
                    x: -13167861
                    y: 4382202
                    spatialReference: SpatialReference { wkid: 3857 }
                }
                targetScale: 50000
            }
        }
    }
}


In this topic
  1. Code