Google base Map not visible

2123
0
04-17-2016 02:46 AM
NadirHussain
Occasional Contributor II


Dear all i am using google as a base ma.i find all of examples but all are in legacy modules.I am using amd dojo.how to add these it should work for me.

    <script type="text/javascript">

        var djConfig = {

            parseOnLoad: true,

            baseUrl: './',

            modulePaths: {

                // if use local copy, make sure the path reference is relative to 'baseUrl', e.g.:

                //'agsjs': '../build/agsjs'

                // use absolute path for online version. Note sometimes googlecode.com can be slow.

                'agsjs': 'http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/1.07/build/agsjs'

            }

        };

       </script>

   

require([

          "esri/dijit/BasemapGallery", "dojo/_base/json",  "dijit/layout/ContentPane", "dijit/TitlePane", "dojo/domReady!"

    ], function ( BasemapGallery, dojoJson,CP,TP ) {

function createBasemapGallery() {

                //Manually create a list of basemaps to display

                basemaps.push(new esri.dijit.Basemap({

                    layers: [new esri.dijit.BasemapLayer({

                        type: 'GoogleMapsRoad'

                    })],

                    title: "Google Road",

                    id: 'GoogleRoad',

                    thumbnailUrl: "images/icons/GoogleRoads.jpg"

                   

                }));

                basemaps.push(new esri.dijit.Basemap({

                    layers: [new esri.dijit.BasemapLayer({

                        type: 'GoogleMapsSatellite'

                    })],

                    title: "Google Satellite",

                    id: 'GoogleSatellite',

                    thumbnailUrl: "images/icons/GoogleSatelite.jpg"

                  

                }));

                basemaps.push(new esri.dijit.Basemap({

                    layers: [new esri.dijit.BasemapLayer({

                        type: 'GoogleMapsHybrid'

                    })],

                    title: "Google Hybrid",

                    id: 'GoogleHybrid',

                    thumbnailUrl: "images/icons/GoogleHybrid.jpg"

                   

                }));

         }

var basemapGallery = new BasemapGallery({ showArcGISBasemaps: true, basemaps: basemaps, bingMapsKey: "Au4pcSZ", google: {

                                apiOptions:{ // google api options.

                                    v: 3.6,

                                }

                            }, map: map }, "basemapGallery");

});

some code is not there.please help.Beacuse on my click event all other base map change even bing map com on click basemap gallery.only google map not come.please help.

0 Kudos
0 Replies