Polygonal map generation article describe step by step map generation unsing Voronoi polygons.
This guy give also all source codes. It's Flash (ActionScript 3 / ECMAScript) but transposable to any other object oriented language
Or try to use algorithms implemented in some fractal environement softwares like TerraJ