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

      0  

    Default Unanswered: How to link map marker to the detail view

    Unanswered: 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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,207
    Answers
    3517
    Vote Rating
    858
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    All you have to do is resolve the nestedlist within the click listener
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread