This project is not covered by Drupal’s security advisory policy.
Summary
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.
News
- 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
http://your-site/gmap3_tools/example
. 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
module_load_include('inc', 'gmap3_tools');
- 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 .= '<div id="gmap-canvas" style="width:500px; height:400px"></div>';
Check README.txt for more documentation and gmap3_tools module file for code examples.
Sponsor
This module is a product of MontenaSoft web development company.
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Maintenance fixes only
Considered feature-complete by its maintainers. - Module categories: Developer Tools, Site Structure, Integrations
- 66 sites report using this module
- Created by pivica on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
Development version: 7.x-1.x-dev updated 19 Jun 2012 at 12:19 UTC