0

enter image description here

Above screenshot is done using custom Scalebar Component, i am wondering to resize scale bar on zoom in and zoom out of Mapview.

ScaleBar{                
        anchors.left: mapView.left
        anchors.bottom: mapView.bottom
        anchors.bottomMargin: 80
        anchors.margins: 10 * scaleFactor
        map:mapView
           }



  QtObject {
        id: internal

        property real segmentWidth: scaleBar.width / 4
        property real segmentHeight: scaleBar.width * 0.05
}

Setting Width and height of the scale bar like this but how can i set width dynamically it should expand width on zoom out

Fallowed this example to create scalebar https://community.esri.com/thread/201990-scale-bar

Added this component in ArcGis Mapview.

What needs to be import to use ScaleBarOverlay in ARCGIS map?

I tried importing Esri.ArcGISRuntime 100.7

ScaleBarOverlay scaleBarOverlay = new ScaleBarOverlay()
mapView.addMapOverlay(scaleBarOverlay)

It says unknown component M300

Sush
  • 21
  • 4
  • As far as I know, there is no `ScaleBarOverlay` in ArcGIS Qt SDK .. I might be wrong though – cabesuon Jul 05 '20 at 12:55
  • Even i thought so and also tried to make custom scale bar component and tried to place it on ArcGis Map which worked fine but i am wondering how to Shrink and expand the width of scale bar when Zoom in and Zoom out like we have in Google maps. – Sush Jul 05 '20 at 13:46

1 Answers1

0

Got solution by setting map.scale to the width of scale bar

Sush
  • 21
  • 4