Linux 软件免费装
Banner图

GTL Maps

开发者 hevelius
更新时间 2026年4月12日 23:30
PHP版本: 7.4 及以上
WordPress版本: 6.9
版权: GPLv2 or later
版权网址: 版权信息

标签

leaflet maps routes gpx poi

下载

0.1.0 0.2.1 0.2.2

详情介绍:

GTL Maps is built for cycling and outdoor tourism websites that need to publish curated routes with detailed GPX data. The plugin registers a "Route" custom post type, handles GPX upload and parsing, and renders interactive Leaflet maps via shortcode or automatically above single route posts. It also provides a "Point of Interest" post type to highlight attractions around each route and exposes REST API endpoints for custom front-end integrations. Key features:

安装:

  1. Upload the plugin folder to /wp-content/plugins/ or install directly through the WordPress Plugins → Add New screen.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. (Optional) Configure Settings:
  4. Go to Settings → GTL Maps
  5. Set the POI-to-route association radius (default: 2km)
  6. Configure default map center coordinates if needed
  7. Create Your First Route:
  8. Navigate to Routes → Add New
  9. Enter a route title and optional description
  10. Upload a GPX file in the "GPX Data" meta box
  11. Add route categories and difficulty level
  12. Click Publish
  13. Display the Map:
  14. Maps automatically appear on single route posts
  15. Use the [gtlmaps] shortcode on any page: [gtlmaps id="123"] for specific route, [gtlmaps category="cycling"] for category
  16. Add the Route Details widget to your sidebar via Appearance → Widgets
Troubleshooting:

屏幕截图:

  • Frontend interactive Leaflet map with elevation profile chart and POI category filters for enhanced user experience
  • POI management screen with custom category icons and automatic route association based on configurable radius settings
  • Settings page for configuring map tile provider, POI association radius, and display options

常见问题:

How do I adjust the automatic POI-to-route radius?

Go to Settings → GTL Maps and change the "Association radius (km)" option. This controls how far a POI can be from the route polyline to be considered related.

Can I customize the map tiles?

Yes. Filter or override the localized GTLMaps.tiles JavaScript property, or dequeue gtl-front and enqueue your own script variant that sets a different tile URL/provider.

Does the plugin work without pretty permalinks?

The REST endpoints rely on the WordPress REST API, which functions with or without pretty permalinks. Ensure your site can serve /wp-json/ routes.

How do I import GPX files?

Navigate to Routes → Add New, enter a title for your route, then scroll to the "GPX Data" meta box. Click "Choose File" to upload your GPX file. Once uploaded, the plugin automatically computes distance, elevation gain/loss, and bounding coordinates. Click "Publish" to make the route live.

What GPX formats are supported?

The plugin supports standard GPX 1.0 and 1.1 formats with track points (trkpt), waypoints (wpt), and route data. Files exported from popular GPS apps like Strava, Garmin Connect, Komoot, and Ride with GPS work seamlessly.

Can I display maps without using shortcodes?

Yes! Maps automatically display above single route post content. You can also use the Route Details widget in your sidebar or the [gtlmaps] shortcode for manual placement on any page.

How do I add Points of Interest?

Go to POIs → Add New, enter the POI details including coordinates (latitude and longitude), and assign a category. POIs within the configured radius (set in Settings → GTL Maps) are automatically associated with nearby routes.

Can I customize map markers and icons?

Yes! Each POI category supports custom icons. When editing a POI category, upload an SVG or PNG icon file via the Media Library. The icon will display on the map for all POIs in that category.

Is the plugin compatible with page builders?

Yes! Use the [gtlmaps] shortcode in any page builder that supports WordPress shortcodes, including Elementor, Beaver Builder, Divi, and Gutenberg blocks.

How do I change the map tile provider?

The default tile provider is configurable via the GTLMaps.tiles JavaScript property. You can filter or override this in your theme by dequeueing the plugin's script and enqueueing your own with a different tile URL. OpenStreetMap, Mapbox, and other Leaflet-compatible providers are supported.

更新日志:

0.2.2 (2026-04-12) === Bug Fixes ===