This project is not covered by Drupal’s security advisory policy.
A collection of developer tools for quick Google map creation from Drupal code. Uses Google map API version 3.
This is utility module - you need this module only if some other module requires it.
Main goal of this module is to offer developers very light and easy PHP implementation of Google Map API version 3 for Drupal.
- 2013-Apr-13 - new features: map geolocation, relative marker coordinates and draggable markers with dragging event that updates custom lat/lng value input form fields.
How to use it
Check example page (you need to enable module to load examples) for couple of short examples
. Note that you do not need to enable module to use it API calls, you just need to include gmap3_tools.inc file in your code.
Basically you need to do 3 things to get working gmap:
- Load gmap3_tools.inc file
- Call gmap3_tools_add_map() function from API file with appropriate map configuration array
// Map example with some custom options and 2 markers. gmap3_tools_add_map(array( 'mapId' => 'gmap-canvas', 'mapOptions' => array( 'zoom' => 8, ), 'markers' => array( gmap3_tools_create_marker(-35, 150, 'Marker with info window', 'Marker info window content.'), gmap3_tools_create_marker(-35, 150.5, 'Marker without info window'), ), 'gmap3ToolsOptions' => array( 'defaultMarkersPosition' => GMAP3_TOOLS_DEFAULT_MARKERS_POSITION_CENTER, ), ));
This function will initialize needed js code and create google map js definition for you.
- Last thing you need to do is add HTML element with 'gmap-canvas' id in your Drupal output - this element will hold Google map.
$page_output .= '
Check README.txt for more documentation and gmap3_tools module file for code examples.
This module is a product of MontenaSoft web development company.
- Maintenance status: Actively maintained
- Development status: Under active development
- Module categories: Developer, Location, Third-party Integration
- Reported installs: 293 sites currently report using this module. View usage statistics.
- Downloads: 3,806
- Last modified: 2 December 2014
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.