1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    8
    Vote Rating
    0
    Presecan is on a distinguished road

      0  

    Default How to link map marker to the detail view

    How to link map marker to the detail view


    Hello everybody!
    I have a map with a marker, and i want to make the marker clicktable to show some basic info.

    I am new to Sencha, and I need advice what should I implemante in listener function to get the same effect as i click on list item:

    for example, this is my code of maprender function

    Code:
    var lat = 37.428607;
    var lng = -122.169344;
    
    
    var latLng = new google.maps.LatLng(lat, lng);
    
    
    var marker = new google.maps.Marker({
        position: latLng,
        map: gmap,
        draggable: false,
        animation: google.maps.Animation.DROP,
        title: 'cool'
    });
    
    
    var contentString = 'bla bla bla';
    
    
    var infowindow = new google.maps.InfoWindow({
        content: contentString
    });
    
    
    google.maps.event.addListener(marker, 'click', function() {
          /* here comes something that will make my detail list visible with the marker details*/
    });
    and i want to make it work in the same way as my function for "itemtap" which i use in my list... something like this:
    Code:
    onMyListItemTap: function(dataview, index, target, record, e, options) {
    this.setActiveItem('detalji');this.down('#back').show();
    this.down('#detalji').setData(record.data);
    }
    Probably the solution is preaty simple but i dont know how to do this, can anyone help
    thank you

  2. #2
    Sencha Premium Member
    Join Date
    Feb 2011
    Posts
    75
    Vote Rating
    1
    ShaneTex is on a distinguished road

      0  

    Default Marker by click

    Marker by click


    This is how I do it.

    google.maps.event.addListener(marker, "click", function() { //added this function
    me.showMapInfo(marker);
    });

    Then I would make your item tap and the clicked marked access the same function, so make your marker and itemtap more generic, then do all the magic in the passed function.

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    8
    Vote Rating
    0
    Presecan is on a distinguished road

      0  

    Default


    thank you for your reply...
    but i dont know how to do that exacly.
    my item tap function (which i use for list), looks like this: onMyListItemTap(dataview, index, target, record, e, option)

    ... that i may refer to this function which arguments should i put in?

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi