Hi Georgi,
There is an example of a map that does that here:
http://zgroks.com/wikka/ZgroksMaps
with source code. It's based on the tutorials cited in the other
responses as well as Google Maps Hacks, Hack #63,
http://mappinghacks.com/projects/gmaps/,
by Rich Gibson and Schuyler Erle. Uses version 3 of the Google Maps
API, a little bit of PHP, and an SQL database. Integrates
Markerclusterer, allows icons to be toggled on and off, as well as the
Panoramio layer, etc.
Grab the source code here, if you want:
http://zgroks.com/wikka/SourceCodeZgroksMaps
Regards,
Bob