<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Freddie Viajero" 
             description="theNinjaBunny"
             author="theNinjaBunny"
             author_email="your-email@gmail.com"
             height="150">
  <Require feature="sharedmap"/>
</ModulePrefs>
<Content type="html"><![CDATA[

<h2>Visita theNinjaBunny.com</h2>

<script>
 var map = new GMap2();

// Create a base icon for all of our markers that specifies the
// shadow, icon dimensions, etc.
var baseIcon = new GIcon();
baseIcon.iconSize = new GSize(70, 70);
baseIcon.iconAnchor = new GPoint(9, 34);
baseIcon.infoWindowAnchor = new GPoint(9, 2);


// Creates a marker whose info window displays the letter corresponding
// to the given index.
function createMarker(point, index) {
  // Create a lettered icon for this point using our icon class
  var letterIcon = new GIcon(baseIcon);
  letterIcon.image = "http://www.theninjabunny.com/fotos/fmaps.png";
  return new GMarker(point, {icon:letterIcon});
}






var points = [];

points.push(new GLatLng(4.631179340411012, -74.102783203125));
points.push(new GLatLng( 3.1843944923387464, -74.72900390625));
points.push(new GLatLng( 1.0765967983064109, -75.552978515625));
points.push(new GLatLng( -0.7250783020332547, -76.8603515625));
points.push(new GLatLng(-3.601142320158722, -77.816162109375));
points.push(new GLatLng( -6.926426847059551, -76.805419921875));
points.push(new GLatLng(-9.058702156392126, -75.574951171875));
points.push(new GLatLng( -12.039320557540572, -77.05810546875));
points.push(new GLatLng(-9.00445156167208, -73.916015625));
points.push(new GLatLng(-5.484768018141262, -71.202392578125));
points.push(new GLatLng(-1.669685500986571, -68.258056640625));
points.push(new GLatLng( 5.605052121404785, -62.567138671875));
points.push(new GLatLng(8.657056998508994, -58.88671875));
points.push(new GLatLng(12.833226023521243, -53.470458984375));
points.push(new GLatLng( 17.23525150539053, -48.97705078125));
points.push(new GLatLng(21.596150576461437, -50.526123046875));
points.push(new GLatLng(21.25866133371466, -55.491943359375));
points.push(new GLatLng(17.18277905643184, -54.11865234375));
points.push(new GLatLng( 14.29632365104816, -47.867431640625));
points.push(new GLatLng( 8.494104537551882, -48.076171875));
points.push(new GLatLng( 6.751896464843375, -52.3828125));
points.push(new GLatLng(10.228437266155943, -58.798828125));
points.push(new GLatLng( 8.21590773620865, -62.68592834472656));






var FM;
// Add markers A - J to the map at random locations
map.getBoundsAsync(function(bounds) {
  var southWest = bounds.getSouthWest();
  var northEast = bounds.getNorthEast();
  var lngSpan = northEast.lng() - southWest.lng();
  var latSpan = northEast.lat() - southWest.lat();

//  for (var i = 0; i < 10; i++) {
    var point = new GLatLng(southWest.lat() + latSpan * Math.random(),
                            southWest.lng() + lngSpan * Math.random());
    map.addOverlay(FM = createMarker(points[0], 1));
  //}

var k = 0;
GEvent.addListener(map, "click", function(marker, point) {

  if (marker) {
    map.openInfoWindowHtml(points[k], "wiiiiiiiiiiii <br> ESTOY EEEBBRIIIIIIIIOOOOO !!! hic!");
  } else {
k++;
kk = 0;
if(k<23) { 
    map.removeOverlay(FM);
	FM = createMarker(points[k], 1)
	map.addOverlay(FM);
	if(kk==1) {
		var ps = [];
		ps.push(points[k-1]);
		ps.push(points[k]);
		map.addOverlay(new GPolyline(ps, "#ff0000", 5, 0.7));
	};
} else {
k = 0;
kk=1;
};
};  
});


/*













*/







});
</script>

]]></Content>
</Module>


