Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Echarts: Initial zoom in map type

There is some way to set an initial zoom in chart of map type?

I have this options:

m.setOption({
tooltip : {
    trigger: 'item'
},
toolbox: {
    show : true,
    orient : 'vertical',
    x: 'right',
    y: 'center',
    feature : {
        mark : {show: true},
        dataView : {show: true, readOnly: false},
        restore : {show: true},
        saveAsImage : {show: true}
    }
},
asoluteZoom : {start : 90, end : 100},
series : [
    {
        name: 'Name',
        type: 'map',
        mapType: 'world',
        hoverable: false,
        roam:true,
        data : [],
        markPoint : {
            symbolSize: 10,  
            itemStyle: {
                normal: {
                    borderColor: '#87cefa',
                    borderWidth: 1,       
                    label: {
                        show: false
                    }
                },
                emphasis: {
                    borderColor: '#1e90ff',
                    borderWidth: 5,
                    label: {
                        show: false
                    }
                }
            },
            data : [
                {name: "Hello!"},
            ]
        },
        geoCoord: {
            "Hello!":[-4.729075, 37.906475],

        }
    }
]

});

I tried with asoluteZoom but nothing happens.

like image 817
ƒernando Valle Avatar asked Jul 06 '26 05:07

ƒernando Valle


2 Answers

Use zoom property of series object.

like image 60
Kangur Avatar answered Jul 07 '26 19:07

Kangur


I solved with: scaleLimit is explained here

like image 32
ƒernando Valle Avatar answered Jul 07 '26 19:07

ƒernando Valle



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!