You are here

function gm3_library in Google Maps API V3 7

Implementation of hook_library().

File

./gm3.module, line 42

Code

function gm3_library() {
  return array(
    'gm3' => array(
      'title' => t('Google Maps Javascript API V3'),
      'website' => 'http://code.google.com/apis/maps/documentation/javascript/',
      'version' => '3',
      'js' => array(
        array(
          'data' => 'http://maps.googleapis.com/maps/api/js?sensor=false',
          'options' => 'external',
          'preprocess' => FALSE,
        ),
        array(
          'data' => drupal_get_path('module', 'gm3') . "/js/gm3.getClass.js",
        ),
        array(
          'data' => drupal_get_path('module', 'gm3') . "/js/gm3.js",
        ),
        array(
          'data' => array(
            'gm3' => array(
              'settings' => array(
                'images' => array(
                  'sprite' => file_create_url(drupal_get_path('module', 'gm3') . '/images/sprite.png'),
                ),
              ),
            ),
          ),
          'type' => 'setting',
        ),
      ),
      'css' => array(
        array(
          'data' => 'http://code.google.com/apis/maps/documentation/javascript/examples/default.css',
        ),
      ),
    ),
    // Fancy info bubbles
    'gm3.infobubble' => array(
      'title' => t('Google Info Bubble'),
      'website' => '',
      'version' => 1,
      'js' => array(
        /*array(
            'data' => 'http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/src/infobubble-compiled.js',
            'options' => 'external'
          )
          * Posted issue to http://code.google.com/p/google-maps-utility-library-v3/issues/detail?id=105&q=size%20infobubble&colspec=ID%20Type%20Status%20Priority%20Fixed%20Owner%20Summary%20Stars
          */
        array(
          'data' => drupal_get_path('module', 'gm3') . "/js/gm3.infobubble.js",
        ),
      ),
    ),
    // Marker clusterer
    'gm3.clusterer' => array(
      'title' => t('Google Marker Cluster'),
      'website' => 'http://google-maps-utility-library-v3.googlecode.com/',
      'version' => '2.0.7',
      'js' => array(
        array(
          'data' => 'http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.7/src/markerclusterer_packed.js',
          'options' => 'external',
          'preprocess' => FALSE,
        ),
      ),
    ),
    // Convex hull
    // NOTE - This is not currently working, DO NOT USE!
    'gm3.convexhull' => array(
      'title' => t('Google Convex Hull'),
      'website' => 'http://www.geocodezip.com/map-markers_ConvexHull_Polygon.asp',
      'version' => '1',
      'js' => array(
        array(
          'data' => drupal_get_path('module', 'gm3') . "/js/gm3.convexhull.js",
        ),
      ),
    ),
    // Google geometry library
    'gm3.geocoder' => array(
      'title' => t('Google Maps Javascript API V3: Geocoder library'),
      'website' => 'http://code.google.com/apis/maps/documentation/javascript/geometry.html',
      'version' => '3',
      'js' => array(
        array(
          'data' => 'http://maps.googleapis.com/maps/api/js?libraries=geometry&sensor=false',
          'options' => 'external',
          'preprocess' => FALSE,
        ),
      ),
      'dependencies' => array(
        array(
          'gm3',
          'gm3',
        ),
      ),
    ),
    // Enable the clicking of points.
    'gm3.point' => array(
      'title' => t('Google Maps Javascript API V3: Point drawing'),
      'website' => 'http://code.google.com/apis/maps/',
      'version' => '3',
      'js' => array(
        array(
          'data' => drupal_get_path('module', 'gm3') . "/js/gm3.point.js",
        ),
      ),
      'dependencies' => array(
        array(
          'gm3',
          'gm3',
        ),
        array(
          'gm3',
          'gm3.clusterer',
        ),
        array(
          'gm3',
          'gm3.infobubble',
        ),
      ),
    ),
    // Enable drawing of Polygons.
    'gm3.polygon' => array(
      'title' => t('Google Maps Javascript API V3: Polygon drawing'),
      'website' => 'http://code.google.com/apis/maps/documentation/javascript/geometry.html',
      'version' => '3',
      'js' => array(
        array(
          'data' => drupal_get_path('module', 'gm3') . "/js/gm3.polygon.lib.js",
        ),
        array(
          'data' => drupal_get_path('module', 'gm3') . "/js/gm3.polygon.js",
        ),
      ),
      'dependencies' => array(
        array(
          'gm3',
          'gm3',
        ),
        array(
          'gm3',
          'gm3.infobubble',
        ),
      ),
    ),
    // Enable the drawing of rectangles.
    'gm3.rectangle' => array(
      'title' => t('Google Maps Javascript API V3: Rectangle drawing'),
      'website' => 'http://code.google.com/apis/maps/documentation/javascript/geometry.html',
      'version' => '3',
      'js' => array(
        array(
          'data' => drupal_get_path('module', 'gm3') . "/js/gm3.rectangle.js",
        ),
      ),
      'dependencies' => array(
        array(
          'gm3',
          'gm3.polygon',
        ),
      ),
    ),
    // Enable the drawing of Lines.
    'gm3.polyline' => array(
      'title' => t('Google Maps Javascript API V3: Polygon drawing'),
      'website' => 'http://code.google.com/apis/maps/documentation/javascript/geometry.html',
      'version' => '3',
      'js' => array(
        array(
          'data' => drupal_get_path('module', 'gm3') . "/js/gm3.polyline.lib.js",
        ),
        array(
          'data' => drupal_get_path('module', 'gm3') . "/js/gm3.polyline.js",
        ),
      ),
      'dependencies' => array(
        array(
          'gm3',
          'gm3',
        ),
        array(
          'gm3',
          'gm3.infobubble',
        ),
      ),
    ),
    // Google geometry library
    'gm3.geometry' => array(
      'title' => t('Google Maps Javascript API V3: Geometry library'),
      'website' => 'http://code.google.com/apis/maps/documentation/javascript/geometry.html',
      'version' => '3',
      'js' => array(
        array(
          'data' => 'http://maps.googleapis.com/maps/api/js?libraries=geometry&sensor=false',
          'options' => 'external',
          'preprocess' => FALSE,
        ),
      ),
      'dependencies' => array(
        array(
          'gm3',
          'gm3',
        ),
      ),
    ),
  );
}