Perlin noise is used a lot in procedural generations. I introduced this patch to go with my map, but if that turns out to be a problem I could also put the code that I use directly in my map instead.
Code taken from there : https://github.com/josephg/noisejs