caso sua aplicação seja web, o javascript seria assim:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps 1</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=SUA_CHAVE_AQUI"
type="text/javascript"></script>
<script type="text/javascript">
var map1;
var latlng1 = [
new GLatLng( -26 + Math.random( ), -51 + Math.random( ) * 2 ),
new GLatLng( -26 + Math.random( ), -51 + Math.random( ) * 2 ),
new GLatLng( -26 + Math.random( ), -51 + Math.random( ) * 2 ),
new GLatLng( -26 + Math.random( ), -51 + Math.random( ) * 2 ),
new GLatLng( -26 + Math.random( ), -51 + Math.random( ) * 2 ),
new GLatLng( -26 - Math.random( ), -51 + Math.random( ) * 2 ),
new GLatLng( -26 + Math.random( ), -51 - Math.random( ) * 2 ),
new GLatLng( -26 - Math.random( ), -51 - Math.random( ) * 2 )
];
function map1_initialize( )
{
if ( GBrowserIsCompatible( ) )
{
map1 = new GMap2( document.getElementById( 'map1div' ) );
map1.addControl( new GSmallMapControl( ) );
map1.addControl( new GMenuMapTypeControl( ) );
map1.setCenter( new GLatLng( 0, 0 ), 0 );
for ( var i = 0; i < latlng1.length; i++ )
{
var marker = new GMarker( latlng1[ i ] );
map1.addOverlay( marker );
}
var latlngbounds = new GLatLngBounds( );
for ( var i = 0; i < latlng1.length; i++ )
{
latlngbounds.extend( latlng1[ i ] );
}
map1.setCenter( latlngbounds.getCenter( ), map1.getBoundsZoomLevel( latlngbounds ) );
}
}
GEvent.addDomListener( window, 'load', map1_initialize );
</script>
</head>
<body onload="map1_initialize()">
<div id="map1div" style="width: 450px; height: 300px;"></div>
</body>
</html>
Coloque suas coordenadas dessa forma:
var latlng1 = [
new GLatLng( 48.1234, -120.1234 ),
new GLatLng( 48.5678, -120.5678 ),
new GLatLng( 48.9101, -120.9112 ),
new GLatLng( 48.1121, -120.1314 ),
new GLatLng( 48.3145, -120.1516 ),
new GLatLng( 48.1617, -120.1718 ),
new GLatLng( 48.1819, -120.1920 ),
new GLatLng( 48.2021, -120.2122 )
];
Agora, se a sua aplicação for desktop, não saberia lhe dizer um modo correto de fazer isso utilizando Java.