Page 31 of 33 FirstFirst ... 212930313233 LastLast
Results 301 to 310 of 324

Thread: Ext.ux.GMapPanel - Google Maps

  1. #301
    Sencha User VinylFox's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,501

    Default

    Try this in GMapPanel3.js

    Line 526, change to:
    Code:
    point = this.fixLatLng(new google.maps.LatLng(place.lat(), place.lng()));
    I remember this bug from a while ago, and I thought I fixed it already, but I see that Github still has the old version. Ill have to check it out when I get home to see what happened to that bug fix.

  2. #302
    Sencha User frrogoy's Avatar
    Join Date
    Jan 2010
    Location
    Central Indiana
    Posts
    89

    Default Thanks!

    That got it! Thanks, and again, I really appreciate your response.

    I will remove my test module shortly for (lack of) security reasons.
    Frank R.

  3. #303
    Sencha User frrogoy's Avatar
    Join Date
    Jan 2010
    Location
    Central Indiana
    Posts
    89

    Default addmarkers

    I noticed the addmarkers wasn't working because the onMapReady function was never being called. I tried the 1/10/2011 version of gmappanel3 that is on github, but couldn't get it to work. (I was getting a blank window.) So I copied a few lines of code from it into the version I had:
    The new addListenerOnce line
    The if (markers[i]){ clause in the addMarkers function
    The fixed markers are being displayed now.

    I also had to add a layout: 'fit' property to the window to get the controls and google logo to fit within the window. This also fixed the resizing problem I was having where the window would resize, but the map wouldn't.

    Nice extension. Thanks!
    Frank R.

  4. #304
    Sencha User
    Join Date
    Mar 2008
    Posts
    566

    Default

    do you have the latest version with all of the corrections?

    Thanks, Marty

  5. #305

    Question Add a custom CSS class to a marker

    That's great extension. Thanks. But I have a little problem.
    When I'm adding a new marker to map, how can I add a custom CSS class to a marker? Or ID?
    I need manipulate marker by JS. (I'm using GmapPanel3.js)

  6. #306
    Sencha User
    Join Date
    Jun 2011
    Posts
    1

    Default

    I'm fairly new to ExtJS so if this question has already been asked, I apologize. I'm trying to use GMapPanel3.js (since I'm using Google Maps API v3) to bring up an ExtJS window with a basic map in it. My map is hosted on another server (my entire configuration is offline) and I point to it in my HTML file using the var GEE_BASE_URL and var GEE_SERVER_URL tags.
    Code:
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>GMap Window Example</title>
    
            <!--BEGIN: Inclusions for ExtJS -->
            <link rel="stylesheet" type="text/css" href="/extjs-3.3.0/resources/css/ext-all.css" />
            <script type="text/javascript" src="/extjs-3.3.0/adapter/ext/ext-base-debug/js"></script>
            <script type="text/javascript" src="/extjs-3.3.0/ext-all-debug.js"></script>
            <!-- END: Inclusion for ExtJS -->
    
            <script type='text/javascript'>
            var GEE_BASE_URL = "http://myserver";
            var GEE_SERVER_URL = "http://myserver";
            </script>
    
            <script type="text/javascript" src="http://myserver/maps/bootstrap_loader.js"></script>
            <script type="text/javascript" src='http://myserver/maps/mapfiles/310/fusion_map_obj_v3.js'></script>
            <script type="text/javascript" src='http://myserver/js/fusion_utils.js'></script>
            <script type="text/javascript" src='http://myserver/js/search_tabs.js'></script>
            <script type="text/javascript" src='http://myserver/js/fusion_maps_v3.js'></script>
            <script type="text/javascript" src='http://myserver/default_map/query?request=Json&var=geeServerDefs'></script>
            <script type="text/javascript" src='js/GMapPanel3.js'></script>
            <script type="text/javascript" src='js/index.js'></script>
    
        </head>
        <body>
        <h1>GMap Window</h1>
    <p>This example shows hwo to create an extension and utilize an external library.</p>
    <input type="button" id="show-btn" value="Gimme a Map" /><br /><br />
    <p>Note that the js is not minified so it is readable. See <a href="js/GMapPanel3.js">Ext.ux.GMapPanel.js</a> and <a href="window-basic.js">window-basic.js</a> for the full source code.</p>
        </body>
    </html>
    I'm not worrying about markers, or extras of any kind right now. I'm just trying to get the map to display correctly. However, when I try using the following code and clicking on the "Gimme a Map" button, I get an error stating "this.F is not a function" in ../maps/mapfiles/310/v3/main.js. It does bring up a window containing all of the usual Google Maps controls (zoom, pan, Map/Satellite/Hybrid) but there is no map inside of that window.

    (This is the index.js that I call in my HTML file.)

    Code:
    /**
    * @author Shea
    */
    
    Ext.onReady(function(){
    
        var mapwin;
        var button = Ext.get('show-btn');
    
        button.on('click', function(){
            // create the window on the first click and reuse on subsequent clicks
            if(!mapwin){
    
                mapwin = new Ext.Window({
                    layout: 'fit',
                    title: 'GMap Window',
                    closeAction: 'hide',
                    width:400,
                    height:400,
                    x: 40,
                    y: 60,
                    items: {
                        xtype: 'gmappanel',
                        zoomLevel: 14,
                        gmapType: 'map',
                        mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'],
                        mapControls: [new GSmallMapControl(),'GMapTypeControl','NonExistantControl'],
                        setCenter: {
                              lat: 0,
                              lng: 0
                        },
                    }
                });
                
            }
            
            mapwin.show();
            
        });
        
     });
    Am I going about this in the right way? My understanding is that this is the "Hello World" of ExtJS integration with Google Maps. Is there anything more basic that I could use? Thanks

  7. #307

    Default How to add overlays in gmappanel3 ?

    Hi , Gmappanel3 is a great extension and it works fine. I am looking for a n example code to add overlays in gmappanel3. I found a good example to overlay WMS layers with googlemap API V3. ( here is the link). I would like to integrate this with gmappanel3. could some one show me a sample for this.

    Thank you

  8. #308
    Sencha User EduardoIbarra's Avatar
    Join Date
    Nov 2010
    Location
    Victoria, MX
    Posts
    19

    Default

    Quote Originally Posted by JorisA View Post
    Awesome, I created something similar a while ago with the ability to automaticly add markers from a datastore, but I din't really finish it.
    Hi JorisA, I'm looking how to do that, could you post that piece of code please?

  9. #309
    Sencha User
    Join Date
    Jan 2011
    Posts
    12

    Default Google Maps V3 extension for ExtJs

    Hello,


    I tried to use Google Maps API 3 examples (recenter-map.html / recenter-map.js), but something wrong goes there - extjs works, ext window successfully loaded but there's no map view there, but I can see some Google Map specific buttons like that for zooming...


    Note: all V2 Google Maps examples worked...


    Any suggestions?

  10. #310
    Sencha User VinylFox's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,501

    Default

    Working fine for me...



    Quote Originally Posted by mr.zaur View Post
    ...Any suggestions?
    Yes, provide more detail, do some debugging.

Page 31 of 33 FirstFirst ... 212930313233 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •