The short answer is: with KML.
Plot your data as KML and then load that data in the plugin.
You can create the data with the javascript API too, but it would
probably much easier to work with native KML. It also means the raw
data will be more portable (you can laod KML into a number of
applications including Google Earth)
The standalone Google Earth makes a great interactive editor of KML so
you can experiement. Create features in the GUI, and right click
created feature and select 'Copy' - goto a text editor and 'paste' -
and you see the KML directly - very easy way to quickly view the
result of editing the data!