简体   繁体   中英

Increase the size of Marker in Jvector map

I have drawn map using JVector map.And specified the custom marker as an image ('pin.png' specified in the code).There are seven markers and I want to increase the size/zoom the marker when the region is selected.

    function SetMap() {
            var map = new jvm.Map({
                container: $('#map_base'),
                map: 'au_mill_en',
                backgroundColor: '#ECF7FD',
                markers: markers,
                series: {
                    markers: [{
                        attribute: 'image',
                        scale: {
                            contact: 'assets/pin.png'// marker image set
                        },
                        values: values,
                    }],
                    regions: [{
                        values: {//color set for wach states/region
                            'AU-SA': '#FADCC2',
                            'AU-WA': '#D3E3F2',
                            'AU-VIC': '#E0EDD1',
                            'AU-TAS': '#EAE0E7',
                            'AU-QLD': '#FDEBBB',
                            'AU-NSW': '#28B6CE',
                            'AU-ACT': '#EAE0D6',
                            'AU-NT': '#EAE0D6'
                        },
                        attribute: 'fill'
                    }]
                },
                regionStyle: {
                    hover: {
                        "fill": '#F4A582'
                    },

                },
                markerStyle: {
                    selected: {
                        r:10
                    },

                },
                regionsSelectable: true,
                regionsSelectableOne: true,
                onRegionClick: function (event, code) {
                   }
            //New South Wales seled as default as per requirement
            map.setSelectedRegions('AU-NSW')
        }
    });

I am new to stackoverflow , so please point out any error in question format.

You can use the icon object and modify the icon size. You can find how to do that in the documentation . Complex icons are probably what you want. Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM