Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make plots smaller when zoom #357

Open
katil47 opened this issue Nov 30, 2017 · 1 comment
Open

Make plots smaller when zoom #357

katil47 opened this issue Nov 30, 2017 · 1 comment

Comments

@katil47
Copy link

katil47 commented Nov 30, 2017

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?

@neveldo
Copy link
Owner

neveldo commented Dec 8, 2017

Hello @katil47 ,

Your issue is the same as #253 in which you can find some information.

FYI, there is a work in progress from @Indigo744 in order to add an option that enable plots scaling, here is the pull-request : #352 , it should be included within the next release of jQuery Mapael.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants