Skip to content

Checking zoom level for cluster distance too slow #28

@peer35

Description

@peer35

Works at the moment but is too clunky:

            let start=parseInt(this.map.getView().getZoom());
            let end=this.map.getView().getZoom();
            this.map.on(['movestart', 'moveend'], function(e) {
                if (e.type == 'movestart') {
                    start=parseInt(e.map.getView().getZoom());
                } else if (e.type == 'moveend') {

                    end=parseInt(e.map.getView().getZoom());
                    if (start!==end) {
                        console.log(end);
                        //SharedEventBus.$emit('change-resolution', end);
                        // Update cluster distances
                        me.updateClusters(end);
                    }
                }

            });

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions