Geotagger Documentation
Please contact support if you have questions or see incorrect or missing information.
Upgrading from Geotagger 2.x
Geotagger 3 is a complete re-write. Geotagger 3 is a proper fieldtype and does not include extension code or module code any longer. Follow these instructions if you have previously installed Geotagger 2.x.
- Uninstall your Geotagger 2.x extension, module and fieldtype. You won't lose any field data since Geotagger doesn't actually store any data currently.
- Follow installation instructions below.
- Follow instructions for adding a Geotagger Field below.
Installation
- Copy EE2/system/expressionengine/third_party/geotagger to your third_party folder (e.g. /_your_ee_system_dir_/expressionengine/third_party/).
- Copy EE2/themes/third_party/geotagger to your themes third_party folder (e.g. /themes/third_party/).
- Login to the ExpressionEngine Control Panel, go to Add-Ons → Fieldtypes.
- Find Geotagger in the list of fieldtypes and click “Install”.
Adding a Geotagger Field
Geotagger does not store latitude, longitude, zoom or any address data in it. You need to create separate custom fields for storing latitude, longitude, zoom and address fields. See instructions below for directions.
- Login to the ExpressionEngine Control Panel, go to Admin → Channel Administration → Custom Fields.
- Find the field group you want to add a Geotagger field to and click Add/Edit Custom Fields.
- Add all of the location fields you need (e.g. address, city, state, postal code, latitude, longitude, zoom). At least one address field and both latitude and longitude fields are the minimum fields required for Geotagger.
- After all of the mapping fields have been created, click the Create a New Custom Field button.
- Select Geotagger in the Field Type dropdown.
- Enter the field label (e.g. Geotag).
- Enter the field name (e.g. geotag).
- Under Custom Field Options, select a Geotagger mode (Manual or Auto-tag).
- Select a default zoom level for the map that will display after a location has been geotagged.
- Specify field mappings for the location fields you will be using. You should map at least one of the following:
- Address field
- City field
- State field
- Zip code field
- Specify field mappings for latitude and longitude fields.
- Optionally specify a field mapping to capture the zoom level.
- Click Submit.
SafeCracker Usage & Requirements
Geotagger now fully supports usage in SafeCracker forms and we have included an example form to help get you started. Be sure to review the requirements and instructions below when setting up your SafeCracker / Geotagger form.
- Your SafeCracker form must have a class="geotagger" attribute.
- DO NOT give the submit button a name="submit" attribute. Doing so will break Auto-tag mode.
- For Geotagger related inputs (fields you have mapped in the field configuration), make sure you set the id attribute to your custom field name (e.g. id="venues_address", id="venues_latitude", etc).
- Override Geotagger's CSS by applying your own style sheet.
- You can only use one SafeCracker / Geotagger form per page.
SafeCracker Example Form
{exp:safecracker channel="venues" return="geotagger/ENTRY_ID" entry_id="{segment_2}" class="geotagger"}
<div>
<input type="hidden" name="venues_latitude" id="venues_latitude" value="{venues_latitude}" />
<input type="hidden" name="venues_longitude" id="venues_longitude" value="{venues_longitude}" />
<input type="hidden" name="venues_zoom" id="venues_zoom" value="{venues_zoom}" />
</div>
<ul>
<li>
<label for="title">Title</label>
<input type="text" name="title" id="title" value="{title}" size="50" maxlength="100" />
</li>
<li>
<label for="venues_address">Address</label>
<input type="text" name="venues_address" id="venues_address" value="{venues_address}" size="50" maxlength="100" />
</li>
<li>
<label for="venues_geotagger">Map</label>
{field:venues_geotagger}
</li>
</ul>
<p><input type="submit" value="Save Entry" name="geotag_submit" /></p>
{/exp:safecracker}
Changelog
1.0
- Initial Release
1.1
- Added support for Gypsy fields
- Added better geocoding support for UK postal codes
- Added option to show Geotagger mapped fields in Geotagger tab
- Added map display for existing entries
- Added option to set base map zoom level per weblog/channel
1.1.1
- Added support for drop-down fields for address info
1.1.2
- Minor bug fixes
1.1.3
- Added option to specify Google Maps API key in config.php
1.1.4
- Fixed bug encountered in settings screen encountered after creating a new channel, then revisiting settings sreen.
1.1.5
- New feature – Now you can capture the map zoom level per entry. Thanks to the Shotwell Company for sponsoring this feature.
2.1
- ExpressionEngine 2.1 compatible
- Uses Google Maps v3 (no more pesky keys!)
2.1.1
- Bug fix – PHP Error was displaying in the settings form when a field group with no fields was assigned to a channel
2.1.2
- Bug fix – Plays nicer with publish layouts
3.0
- Converted to proper fieldtype. No more tabs or configuring settings via the extension.
- Added ability to use Geotagger with SafeCracker forms.
- Added auto-tag mode.
- Now uses v3.3 of the Google Maps Javascript API.
3.0.1
- Namespaced fieldtype settings
3.0.2
- Bug fix for entries that have not been geocoded and are opened for editing in the control panel.
3.0.3
- Bug fix for field groups with the same name on MSM installs
- Bug fix for HTTPS loading Google Maps
3.0.4
- Bug fix when adding new Geotagger fields
