addMouseWheelListener not recognized in MapThing example

I installed the MapThing library. When i try to run the example i get the error “addMouseWheelListener dindn’t exist”. This occurs both using processing 3 or 4 and on different PC. What’s wrong ?

Hi @mikLomba,

I think you can simply remove the lines for adding the listener as it should be already registered to use this…

— mnse

deleting the “addMouseWheelListener” i was able to run the example, but the zoom-unzoom functionality is not working…
(also it was necessary to move out from “setup” the call to “size” function …putting it in the “settings”). I’m not new with processing having developed some graphic applications…and I’m surprised by the number of errors encountered in this library example

Any other suggestions ?

Hi @mikLomba,

Can’t test it currently as I’m not at my box, but I had a quick look at the GitHub example

Map thing example

The code is a bit outdated, so variabel size can nowadays only be set on settings as for size in setup w,h needs to be constants.

For zooming you need to change the code a bit at line

void mouseWheel(int delta)
to the signature from the reference link in my earlier post. The delta is then most probably


— mnse

The example in the library works fine with the Processing 2.x. So i guess it is not fully compatible with later processing release.


Yes true and there is no update for this library

Hello @mikLomba,

I got this working with Processing 3.5.4 !

There were other errors with Processing 4.2; they may be related to the higher versions of JAVA that come with Processing 4.2.

Go to the GitHub repository here:

Take a look at the Pull requests (there are 2) and this will give some insight into changes necessary.

This will address the “addMouseWheelListener” issue:

This will address the “size() in setup issue”

You will have to combine the changes above into one sketch!
I suggest you start with the first one and then just make the changes to the size() in the next one. :)


Have fun navigating GitHub!

I used MapThing version 1.4 and installed it with the Processing Contribution Manager.

The MapThing version on GitHub is 1.4.1 and when I manually added this library it asked me to update to 1.4!
This sometimes happens with older libraries that are not maintained to work with the Processing Contribution Manager.
I did not explore further on the version numbers.

Reference to Map Thing version number on GitHub:

Map Thing is over 10 years old and Processing has made big leaps over time to new versions.
This is to be expected with a library that has not been updated.
Fortunately it is shared on GitHub and can be updated by those taking an interest.