I've been trying this for days :
http://www.kaaxan.com/location-vacances-mexique.php

//<![CDATA[

    function createInfoMarker(point, address)
    {
      var marker = new GMarker(point);
      GEvent.addListener( marker ,
                          "click" ,
                          function(){marker.openInfoWindowHtml
(address);}
                        );
      return marker;
    }


    function Positionner(Long, Lat)
    {
      map.setCenter(new GLatLng(Lat, Long), 17);
    }

    // Cr�ation de la carte dans le DIV 'map'
    var map = new GMap2(document.getElementById("map"));

    // Param�trage de la carte
        map.G_SATTELITE_MAP
    map.setCenter(new GLatLng(20.62097,-87.07523), 16);  //
Positionnement


// Playacar Fase I
// Initialisation de l'array "monpolygone" pr�charg� par le contenu
des cordonn�es des points d�limitant le polygone
          var playacar1 = new GPolygon([
            new GLatLng(20.62097, -87.07523),
            new GLatLng(20.62109, -87.07754),
            new GLatLng(20.61575, -87.08163),
            new GLatLng(20.61176, -87.08489),
            new GLatLng(20.61085, -87.08382),
            new GLatLng(20.61326, -87.08021),
            new GLatLng(20.62097, -87.07523)
            ], "#00ACEF", 1, 1, "#00ACEF", 0.2);
// Affichage du polygone
          map.addOverlay(playacar1);



// Playacar Fase II
// Initialisation de l'array "monpolygone" pr�charg� par le contenu
des cordonn�es des points d�limitant le polygone
          var playacar2 = new GPolygon([
            new GLatLng(20.61977, -87.07862),
            new GLatLng(20.62150, -87.08789),
            new GLatLng(20.60953, -87.10257),
            new GLatLng(20.60101, -87.09386),
            new GLatLng(20.61085, -87.08429),
            new GLatLng(20.61184, -87.08514),
            new GLatLng(20.61977, -87.07862)
            ], "#CC0033", 1, 1, "#CC0033", 0.2);
// Affichage du polygone
          map.addOverlay(playacar2);
                  // "point" correspond aux coordonn�es du marker
          var point2 = new GLatLng(20.60953, -87.10257);



// centre
// Initialisation de l'array "monpolygone" pr�charg� par le contenu
des cordonn�es des points d�limitant le polygone
          var centre = new GPolygon([
            new GLatLng(20.62335, -87.08103),
                        new GLatLng(20.62086, -87.07485),
            new GLatLng(20.62792, -87.06717),
            new GLatLng(20.63439, -87.07197),
            new GLatLng(20.62335, -87.08103)
            ], "#009933", 1, 1, "#009933", 0.2);
// Affichage du polygone
          map.addOverlay(centre);


// Mamita's
// Initialisation de l'array "monpolygone" pr�charg� par le contenu
des cordonn�es des points d�limitant le polygone
          var mamitas = new GPolygon([
            new GLatLng(20.62845, -87.06661),
                        new GLatLng(20.63345, -87.07051),
            new GLatLng(20.63608, -87.06824),
            new GLatLng(20.63345, -87.06275),
            new GLatLng(20.62845, -87.06661)
            ], "#FF6600", 1, 1, "#FF6600", 0.2);
// Affichage du polygone
          map.addOverlay(mamitas);


// Coco Beach
// Initialisation de l'array "monpolygone" pr�charg� par le contenu
des cordonn�es des points d�limitant le polygone
          var coco = new GPolygon([
            new GLatLng(20.63387, -87.06202),
                        new GLatLng(20.63628, -87.06656),
            new GLatLng(20.63782, -87.06433),
            new GLatLng(20.63668, -87.05855),
            new GLatLng(20.63387, -87.06202)
            ], "#FFFF00", 1, 1, "#FFFF00", 0.2);
// Affichage du polygone
          map.addOverlay(coco);

//Quinta
// Initialisation de l'array "monpolygone" pr�charg� par le contenu
des cordonn�es des points d�limitant le polygone
          var quinta = new GPolygon([
            new GLatLng(20.621480000000002, -87.0759),
                        new GLatLng(20.621470000000002, -87.07583000000001),
                        new GLatLng(20.637610000000002, -87.06428000000001),
                        new GLatLng(20.621480000000002, -87.0759)
            ], "#FF0000", 1, 1, "#FF0000", 0.2);
// Affichage du polygone
          map.addOverlay(quinta);

    map.addControl(new GSmallMapControl());       // Outils
d�placement et zoom
    map.addControl(new GScaleControl()) ;         // Affichage �chelle
        map.enableScrollWheelZoom();

   // map.addControl(new GMapTypeControl());        // Choix type de
carte
        map.setMapType(G_SATELLITE_MAP);
    map.addControl(new GOverviewMapControl());    // Mini carte de
navigation
    map.enableDoubleClickZoom();                  // Zoom par double-
click

    // Ajout des points
    // -----------------
    // Affichage automatique des maisons

THIS IS THE PART THAT DOES NOT WORK: NO MARKER IS SHOWING AT ALL !!!


var point = new GLatLng(-87.08458,20.61453 );
address = "<b>Villa Milpa</b><br/>Playacar Fase 2";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.07985,20.61441);
address = "<b>Casa Grande</b><br/>Playacar Fase 1";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87,20);
address = "<b>Casa Irlanda</b><br/>Playacar Fase 1";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.08241,20.61318);
address = "<b>Casa La Loma</b><br/>Playacar Fase 1";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.07282,20.62428);
address = "<b>Luna Encantada H1</b><br/>Centre";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.08033,20.61650);
address = "<b>Villa la Perla Blanca</b><br/>Playacar Fase 2";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.07785,20.61938);
address = "<b>Villa Gallager</b><br/>Playacar Fase 1";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.07785,20.61938);
address = "<b>Casa Alegre</b><br/>Playacar Fase 1";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.06337,20.63623);
address = "<b>Meridian 204</b><br/>Coco Beach";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.06620,20.63225);
address = "<b>Mamitas 105A</b><br/>Mamita's";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.06620,20.63225);
address = "<b>Mamitas 302B</b><br/>Mamita's";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.08049,20.61970);
address = "<b>Casa Estrella</b><br/>Playacar Fase 2";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.06144,20.63568);
address = "<b>The Elements Penthouse 24</b><br/>Coco Beach";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.06144,20.63568);
address = "<b>The Elements Garden House 1</b><br/>Coco Beach";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.07041,20.63546);
address = "<b>Agua Terra 205</b><br/>Mamita's";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.08432,20.61428);
address = "<b>Villa Santa Fe</b><br/>Playacar Fase 2";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.06941,20.63129);
address = "<b>Arco Iris 5</b><br/>Centre";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.06285,20.63576);
address = "<b>Luna Maya</b><br/>Coco Beach";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.06285,20.63576);
address = "<b>Luna Maya Estrella 1</b><br/>Coco Beach";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.06285,20.63576);
address = "<b>Luna Maya Tormenta 2</b><br/>Coco Beach";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.06285,20.63576);
address = "<b>Luna Maya Tormenta 6</b><br/>Coco Beach";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.06144,20.63576);
address = "<b>Luna Maya Sol 5</b><br/>Coco Beach";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.08354,20.61366 );
address = "<b>Casa Stella del Mar</b><br/>Playacar Fase II";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.08090,20.61483 );
address = "<b>Casa Cascada</b><br/>Playacar Fase 1";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.07970,20.61449 );
address = "<b>Casa Maeva</b><br/>Playacar Fase 1";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.07860,20.61668 );
address = "<b>Casa Cariño</b><br/>Playacar Fase 1";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.08313,20.61295);
address = "<b>Casa de Los Cielos</b><br/>Playacar Fase 1";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.07817,20.61671);
address = "<b>Casa Oasis</b><br/>Playacar Fase 1";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.06291,20.63453);
address = "<b>Condo Natz Ti Ha</b><br/>Coco Beach";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.08359,20.62131);
address = "<b>MayaMar  D5</b><br/>Playacar Fase 2";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.08559,20.62181);
address = "<b>MayaMar  G3</b><br/>Playacar Fase 2";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);

var point = new GLatLng(-87.08489,20.62162);
address = "<b>MayaMar F7</b><br/>Playacar Fase 2";
var marker = createInfoMarker(point, address);
map.addOverlay(marker);


//WM
// Ajout de la propri�t� "Marker" (rep�re personnalis�)
          var point = new GLatLng(20.62843, -87.07605); // Position du
marker
// Initialisation d'un nouvel objet GIcon et de ses propri�t�s
          var MonIcon = new GIcon();
          //MonIcon.shadow = "images/arrow_down.png"; // Image "Ombre"
          //MonIcon.shadowSize=new GSize(56,32); // Dimensions de
l'image "Ombre"
          MonIcon.iconSize=new GSize(60,10);
          MonIcon.iconAnchor=new GPoint(10,10);
          MonIcon.image="images/WM.png";
// Affichage du marker (rep�re)
          var marker = new GMarker(point,MonIcon);
          map.addOverlay(marker);

//BUS
// Ajout de la propri�t� "Marker" (rep�re personnalis�)
          var point = new GLatLng(20.62272, -87.07517); // Position du
marker
// Initialisation d'un nouvel objet GIcon et de ses propri�t�s
          var MonIcon = new GIcon();
          //MonIcon.shadow = "images/arrow_down.png"; // Image "Ombre"
          //MonIcon.shadowSize=new GSize(56,32); // Dimensions de
l'image "Ombre"
          MonIcon.iconSize=new GSize(30,23);
          MonIcon.iconAnchor=new GPoint(10,10);
          MonIcon.image="images/bus.png";
// Affichage du marker (rep�re)
          var marker = new GMarker(point,MonIcon);
          map.addOverlay(marker);

//TAXI
// Ajout de la propri�t� "Marker" (rep�re personnalis�)
          var point = new GLatLng(20.62280, -87.07577); // Position du
marker
// Initialisation d'un nouvel objet GIcon et de ses propri�t�s
          var MonIcon = new GIcon();
          //MonIcon.shadow = "images/arrow_down.png"; // Image "Ombre"
          //MonIcon.shadowSize=new GSize(56,32); // Dimensions de
l'image "Ombre"
          MonIcon.iconSize=new GSize(30,15);
          MonIcon.iconAnchor=new GPoint(10,10);
          MonIcon.image="images/taxi.png";
// Affichage du marker (rep�re)
          var marker = new GMarker(point,MonIcon);
          map.addOverlay(marker);




    </script>

</div>



I CANNOT GET IT TO WORK !!!
IT JUST WONT PUT THE MARKERS DOWN.....
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to