google maps binding

i have code http://webix.com/snippet/fccb4ada,
how to binding maps data (lat, lng, title, desc) to form, in right click on the maps or left click on the markers

thanks.

Binding in Webix terms is applicable to a data (multi-value) component and form (single-value component). Data is pushed from master to slave on selection basis. Simply put, an item should be selected within master to be displayed by a form.

So, in you case you need to listen to a click event on the marker (you already do it to open the info window), get available marker data and push it to the form.

I suggest triggering a custom onMarkerChange event:

google.maps.event.addListener(marker, 'click', webix.bind(function () {
     this.callEvent("onMarkerClick", [marker]);
}, this));

And the event handler:

on:{
     onMarkerClick:function(marker){
        var values = {
              	lat:marker.position.lat(),
                lng:marker.position.lng()
        };
        $$("formView").setValues(values);
     }
}

http://webix.com/snippet/8f84cfb1

Nice, Thanks you very much mrs. Helga