Skip to content

Make plots smaller when zoom #357

@katil47

Description

@katil47

Dear Neveldo,

i set plot size is 7,
but when zoom in,
the plot will grow larger .
I tried this for make the the plots smaller when zoom in

` $('#world-map').on('afterZoom', function()
{
var newSize = defaultPlotSize * Math.pow(0.95, $(this).data('mapael').zoomData.zoomLevel);

					var allPlots = $('#world-map').data('mapael').options.plots;
					
					for(var propName in allPlots) {
						  allPlots[propName].size = newSize;
					}
					
					$('#world-map').trigger('update', allPlots);
				});`

What is wrong in my code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions