Trabajando con Backbone.js y Google maps cómo puedo conectar los markers a la vista del mapa?
¡
Conectar markers - backbone con Google maps
Iniciado por
Pascual
, jul 17 2014 05:52
#1 AUTOR PREGUNTA
Preguntas Similares
Esto también te interesa!
#2
Publicado 17 julio 2014 - 20:50
Debes crear una vista en Backbone:
Y por último inicializa la vista:
initialize: function (opts) {
_.bindAll(this);
this.markers = opts.markers;
this.markers.on('change', this.render); },
render: function () { // crea o actualiza el mapa}
Y por último inicializa la vista:
var markers = new MyApp.MarkerCollection(),
view = new MyApp.MapView({ markers: markers });