Jump to Content

Objective HTML

Using Plugins

Google Maps for ExpressionEngine v3 is completely extendible. One way to extend the add-on is to create a plugin for the Fieldtype. There are two types of plugins for the Fieldtype, CSS and JavaScript. CSS plugins are just a way to change the core CSS without hacking the core stylesheet. JavaScript plugins are more than standard JavaScript and jQuery, which can be used to directly manipulate the main Gmap object, and hook into various events.

Installing Plugins

Installing plugins is extremely easy and relatively painless.

JavaScript Plugin Directory

1. Drag or save plugin to your themes/third_party/gmap/plugins/javascript/enabled/ directory

2. Open plugin and follow instructions within the file to finish setup.

CSS Plugin Directory

1. Drag or save css file to your themes/third_party/gmap/plugins/css/ directory

JavaScript Plugins

JavaScript plugins are stored in two directories, enabled and disabled. Any plugin located in the enabled directory will be loaded dynamically one time, even if there are multiple Gmap fieldtypes in the same channel. You don't need to include any files for these scripts to load. Simply ensure the scripts you want to execute are inside the enabled directory and reload the page.