Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/02/2016, 11:27
BaSingSe
 
Fecha de Ingreso: mayo-2012
Mensajes: 117
Antigüedad: 12 años
Puntos: 1
Bucle para marcas en gmap

Estoy usando las librerias gmap.js, http://ajax.googleapis.com/ajax/libs.../jquery.min.js and http://maps.google.com/maps/api/js?sensor=true

La informacion de las marcas vendran desde la base de datos por el momento lo tengo de esta manera

Código Javascript:
Ver original
  1. map.addMarker({
  2.       lat: 18.49614974639753, // this
  3.       lng: -69.84678268432617, // this
  4.       title: 'xxx',
  5.       animation:google.maps.Animation.BOUNCE,
  6.       infoWindow: {content: '<p>HTML Content</p>'}
  7.   });

Y estoy tratando de convertirlo a algo como esto
Código Javascript:
Ver original
  1. var markers=[
  2.       ['name',18.4705823,-69.8389807],
  3.       ['name2',18.49614974639753,-69.84678268432617],
  4.     ];
  5. var infoWindowContent = [
  6.         ['<div class="info_content"><h3>name</h3><p>content</p></div>'],
  7.         ['<div class="info_content"><h3>name2</h3><p>content</p></div>']
  8.     ];
  9.     for (var i; i < markers.length; i++) {
  10.       point= markers[i];
  11.       map.addMarker({
  12.       position: point,
  13.       title: 'xxx',
  14.       infoWindow: InfoWindowContent,
  15.       animation:google.maps.Animation.BOUNCE
  16.       });
  17.     }

Pero cuando agrego ese bucle la marca no aparece solo aparecen los polygonos