Project

General

Profile

Revision c6c196ff

IDc6c196ff6d4706631aa8ddd98e4429cae2fd1925
Parent 46de7f4c
Child 5c47f51c

Added by Andreas Kohlbecker over 2 years ago

#6609 testing and debugging

View differences:

modules/cdm_dataportal/includes/maps.inc
156 156
      if(str_beginsWith($name, 'g')){
157 157
        if( isset($map_settings['openlayers']['google_maps_api_key']) && strlen($map_settings['openlayers']['google_maps_api_key']) == 39) {
158 158
          // google layer detected
159
          drupal_add_js("https://maps.googleapis.com/maps/api/js?key=" . $map_settings['openlayers']['google_maps_api_key'] . "&callback=initMap", 'external');
159
          drupal_add_js("https://maps.googleapis.com/maps/api/js?key=" . $map_settings['openlayers']['google_maps_api_key'] . "&callback=initMap",
160
          //drupal_add_js("https://maps.google.com/maps/api/js?callback=initMap&key=" . $map_settings['openlayers']['google_maps_api_key'],
161
          array(
162
            'type' => 'external',
163
            'defer' => true
164
            ));
165

  
166
          //drupal_add_js("http://maps.google.com/maps/api/js?callback=initMap&key=" . $map_settings['openlayers']['google_maps_api_key'], 'external');
167
          //drupal_add_js("http://maps.google.com/maps/api/js?v=3&sensor=false", 'external');
160 168
        } else {
161 169
          drupal_set_message('A Google Maps layer is configured but the API key is either missing or invalid. 
162 170
          Please set your Google Maps API key in the '  . l('Geo & Map Settings', 'admin/config/cdm_dataportal/settings/geo') .'.', 'warning');
modules/cdm_dataportal/js/map/openlayers_layers.js
151 151
                  );
152 152

  
153 153
          // create Google Mercator layers
154
          case 'gmroadmap':
154
          case 'groadmap':
155 155
            return  new OpenLayers.Layer.Google(
156 156
                      "Google Roadmap",
157 157
                      {
158
                          type: 'roadmap',
158
                          // rooad map is default
159 159
                          projection: window.CdmOpenLayers.projections.epsg_900913,
160 160
                          // Allow user to pan forever east/west
161 161
                          // Setting this to false only restricts panning if sphericalMercator is true.
......
171 171
                      "Google Satellite",
172 172
                      {
173 173
                        type: 'satellite',
174
                        projection: window.CdmOpenLayers.projections.epsg_900913,
174
                        //projection: window.CdmOpenLayers.projections.epsg_900913,
175 175
                        // Allow user to pan forever east/west
176 176
                        // Setting this to false only restricts panning if sphericalMercator is true.
177 177
                        wrapDateLine: false,
178
                        sphericalMercator: true,
178 179
                        numZoomLevels: 22
179 180
                      }
180 181
                  );
......
187 188
                          // Allow user to pan forever east/west
188 189
                          // Setting this to false only restricts panning if sphericalMercator is true.
189 190
                          wrapDateLine: false,
191
                          sphericalMercator: true,
190 192
                          numZoomLevels: 22
191 193
                      }
192 194
                  );
......
195 197
            return  new OpenLayers.Layer.Google(
196 198
              "Google Terrain",
197 199
              {
198
                type: 'terrain',
199
                projection: window.CdmOpenLayers.projections.epsg_900913,
200
                type: google.maps.MapTypeId.TERRAIN,
201
                // projection: window.CdmOpenLayers.projections.epsg_900913,
200 202
                // Allow user to pan forever east/west
201 203
                // Setting this to false only restricts panning if sphericalMercator is true.
202 204
                wrapDateLine: false,
modules/cdm_dataportal/js/map/openlayers_map.js
250 250

  
251 251
          createBaseLayers(opts.baseLayerNames, opts.defaultBaseLayerName, opts.customWMSBaseLayerData);
252 252

  
253
          initMap();
253
          initializeMap();
254 254

  
255 255
          // now it is
256 256
          if(opts.boundingBox){
......
489 489
        /**
490 490
         * Initialize the Openlayers Map with the base layer
491 491
         */
492
        var initMap = function(){
492
        var initializeMap = function(){
493 493

  
494 494
          if(opts.showLayerSwitcher === true){
495 495
              defaultControls.push(new OpenLayers.Control.LayerSwitcher({'ascending':false}));
modules/cdm_dataportal/settings.php
2989 2989
    'edit-etopo1' => "ETOPO1 Global Relief Model",
2990 2990
    // all others EPSG:900913
2991 2991
    'mapnik' => 'OpenStreetMap',
2992
    'mapquest_open' => "MapQuest",
2993
    'mapquest_sat' => "MapQuest Sattelite",
2992
    // map quest is no longer free. it is required to sign up for a test plan.
2993
    // 'mapquest_open' => "MapQuest",
2994
    // 'mapquest_sat' => "MapQuest Sattelite",
2994 2995
    'groadmap' => 'Google Roadmap',
2995 2996
    'gsatellite' => 'Google Satellite',
2996 2997
    'ghybrid' => 'Google Hybrid',

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)