Skip to content
Snippets Groups Projects

Add Using GPX files with Geocoder and Geofield

Merged ressa requested to merge issue/geocoder-2747193:2747193-4x into 8.x-4.x
1 file
+ 16
0
Compare changes
  • Side-by-side
  • Inline
+ 16
0
@@ -355,6 +355,22 @@ enabling support and configuration for the
- in your *settings.php add:
`$settings['cache']['bins']['geocoder'] = 'cache.backend.permanent_database'`
## Using GPX files with Geocoder and Geofield
Here's how to set up [Geofield](https://www.drupal.org/project/geofield), [Geocoder](https://www.drupal.org/project/geocoder), and [Leaflet](https://www.drupal.org/project/leaflet) (optional) to display a track uploaded in .gpx file format.
1. Install Geocoder, Geocoder Field, Geocoder Geofield, Geofield, and Leaflet (optional)
1. Create a "GPX File" Geocoder provider under _/admin/config/system/geocoder/geocoder-provider_
1. Create a file field in a content type, used to upload a GPX file
1. Create a Geofield field in a content type, allowing only one value
1. Set up the Geofield field like this:
- Geocode → Geocode from an existing field
- Geocode from an existing field → select file field used to upload the GPX file
- Geocoder plugins → checked "GPX File"
1. For the Geofield field, in "Manage display" choose "Leaflet Map" (if available) or just "Raw Output"
1. Create new content with an attached GPX file
1. The Leaflet map should show the route or point, or if raw value used, something like `POINT (2.862523 42.874582)` or `MULTILINESTRING ((-3.4584857337177 48.72786023654 [...]`
# Upgrading from Geocoder 2.x to 3.x (and above))
## Site builders
Loading