1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    17
    Vote Rating
    0
    uhuru is on a distinguished road

      0  

    Default google maps, marker popup

    google maps, marker popup


    Hi. Can anyone give me an example of how create marker popups?

    I have this:
    Code:
    google.maps.event.addListener(marker, 'click', function() {
            infowindow = new google.maps.InfoWindow({
                 content: "<h4>"+marker.title + "</h4><br /><br />" + marker.body
            })
             infowindow.open(map.map,marker);
      });
    it works on Chrome for example, but doesn't work in Android, any help? Thanks

  2. #2
    Ext JS Premium Member SimonFlack's Avatar
    Join Date
    Jul 2010
    Location
    Norway
    Posts
    241
    Vote Rating
    3
    SimonFlack is on a distinguished road

      0  

    Default


    This is what I am using... I'll check it on android and get back to you.

    Code:
    uin.map.addCampus = function() {
        var map = Ext.getCmp('Map').map,
            address = 'Morkvedtrakket 30, Bodo',
            imageUrl = 'images/campus.png';
            
        uin.map.geocoder.geocode( { 'address': address}, function(results, status) {
          if (status == google.maps.GeocoderStatus.OK) {
            
            //map.setCenter(results[0].geometry.location);
            
            var marker = new google.maps.Marker({
                map: map, 
                position: results[0].geometry.location,
                icon: new google.maps.MarkerImage(imageUrl, new google.maps.Size(73,36), new google.maps.Point(0,0), new google.maps.Point(15,10)),
                animation: google.maps.Animation.DROP,
                shape: {coord: [0,0,0,36,73,36,73,0], type: 'poly'}
            });
            
            
            var contentString = '<div>' +
                                    '<img src="images/campus_info.png" width="150">' +
                                '</div>';
            
            var infoWindow = new google.maps.InfoWindow({
                content: contentString
            });
            
            google.maps.event.addListener(marker, 'click', function(){
                infoWindow.open(map,marker)
            });
            
            
          } else {
            alert('Ingen resultat');
          }
        });
    }
    Looks pretty much the same.
    Simon Flack
    CEO and UX Designer
    WhiteFox AS, Norway

    Web: www.whitefox.no

    Facebook: www.facebook.com/WhiteFoxAS

    Twitter: @WhiteFoxAS

  3. #3
    Sencha User
    Join Date
    Jan 2011
    Posts
    17
    Vote Rating
    0
    uhuru is on a distinguished road

      0  

    Default


    Thanks for the answer. I think the problem is the listener

    Code:
    google.maps.event.addListener(marker, 'click', function() {
            alert("something");
      });
    I've tried this on a nexus one and on a iPhone and doesn't show the alert, but it's working in a samsung android...

  4. #4
    Sencha User
    Join Date
    Aug 2010
    Location
    Europa
    Posts
    216
    Vote Rating
    1
    kortovos is on a distinguished road

      0  

    Default


    Try a 'mousedown' instead of a 'click', that works for me with chrome and an Ipad

  5. #5
    Sencha User
    Join Date
    Jan 2011
    Posts
    17
    Vote Rating
    0
    uhuru is on a distinguished road

      0  

    Default


    Quote Originally Posted by kortovos View Post
    Try a 'mousedown' instead of a 'click', that works for me with chrome and an Ipad
    Thanks! i've to try on iPhone but at least now it's working on the nexus one

  6. #6
    Sencha User
    Join Date
    Feb 2011
    Posts
    1
    Vote Rating
    0
    adcon is on a distinguished road

      0  

    Default mouseup while panning map

    mouseup while panning map


    I am using the mouseup event and all is fine, but if I hit a marker while trying to drag the map I would like to ignore that mouseup. Any ideas how to tell if the mouseup was part of a drag or just a "click"?

Similar Threads

  1. How to populate ext.window marker to show google map?
    By carissamontez88 in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 13 Dec 2010, 5:51 AM
  2. Google Maps Marker Adder
    By Gamer in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 5 Nov 2010, 4:43 PM
  3. Ext.Map/Google Maps marker and android
    By apw in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 26 Jun 2010, 5:11 AM
  4. Google Maps set a marker and save Infos
    By extjsfish in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 20 Jan 2009, 10:03 AM
  5. [Desktop 2.0] Live-Maps / Google-Maps Module v0.1
    By franckxx in forum Community Discussion
    Replies: 10
    Last Post: 22 Mar 2008, 1:00 AM

Thread Participants: 3

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