Hybrid View

  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    5
    Vote Rating
    0
    j16e16z is on a distinguished road

      0  

    Default Unanswered: Prevent scrolling when interacting with Google Maps

    Unanswered: Prevent scrolling when interacting with Google Maps


    I migrated this app from JQuery Mobile, and I used the Google API to make a Google map. I am aware Sencha has a map object, but I have already coded everything into the current map I have, and am not sure how to do so in the map element.

    Moving on, when I touch the current map and move stuff around, it scrolls the whole page. How can I prevent the whole screen from scrolling vertically when I click on a particular DIV? Is it possible?

    EDIT: I have a form on this page as well, so I need the screen to scroll. I just want to stop the scroll event when I click anywhere in the DIV that contains my map.

    Code:
            var locationPanel = Ext.create("Ext.form.Panel", {
                title: 'Location',
                iconCls: 'info',
                xtype: 'formpanel',
                layout: 'vbox',
    
    
                items: [
                    {
                        xtype: 'fieldset',
                        title: 'Geolocation',
                        items: [
                            {
                                xtype: 'textfield',
                                label: 'Address',
                                id: 'address',
                                listeners: {
                                    blur: function(){codeAddress('latitude', 'longitude', true)}
                                }
                            },
                            {
                                xtype: 'textfield',
                                label: 'Latitude',
                                id: 'latitude',
                                readOnly: true
                            },
                            {
                                xtype: 'textfield',
                                label: 'Longitude',
                                id: 'longitude',
                                readOnly: true
                            }
                        ]
                    },
                    {
                        html:     [
                            '<br/><center><div id="map_canvas" style="border:1px solid black;width: 90%; height: 200px"></div></center><br/>'
                        ]
                    }
                ],
                listeners: {
                    activate: function() {
                      if(firstLoad)
                      {
                        getCoords();
                        firstLoad = false;
                      }
                    }
                }
            });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Answers
    3356
    Vote Rating
    751
    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


    I would use Ext.Map to do it proper. I wouldn't mix more than one framework, a lot to download.
    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

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar