Skip to content

v0.424

Latest

Choose a tag to compare

@AceMedia AceMedia released this 16 Oct 07:09

Ace Google Map Block v0.424 - Release Notes

This release includes several enhancements, fixes, and new features to improve the functionality and flexibility of the Google Maps integration within WordPress. Below are the highlights of this version:


https://x.com/i/status/1846396760647721016


New Features & Improvements:

  1. Dynamic API Endpoints for Maps:

    • We’ve introduced new REST API routes to expose Google Map data per post or across all posts containing map data. The new endpoint /wp-json/acemap/v1/all lists posts with map data and includes post ID, title, and permalink alongside map details.
    • The single map endpoint /wp-json/acemap/v1/{post_id} provides specific map data, dynamically removing unnecessary fields based on the map type (Street View or Static Image).
  2. Selective Data Exposure:

    • Map data exposed via the REST API now intelligently hides fields that aren’t necessary based on the map's configuration:
      • For Street View maps, fields such as disableZoom, disableLabels, and showMarker are excluded.
      • For Static Image maps, fields like mapStyle, isStreetView, and others are omitted. The plugin also now dynamically generates a Google Maps Static Image URL.
  3. Improved Meta Handling:

    • Fixed an issue where meta data was not saved when the map block was nested inside other blocks. This ensures that all attributes—whether a map is within a parent block or not—are consistently saved as post meta.
  4. UI Enhancements:

    • Inspector Controls have been refined to allow easy toggling of Street View, map background mode, and other settings. This results in a smoother experience while configuring maps directly within the block editor.
    • Default settings from the plugin are now correctly set on block initialization if not explicitly overridden.
  5. Post Meta Data Handling:

    • Enhanced how block-level settings are saved as post meta, ensuring that defaults are only applied where necessary and that user-defined settings always take precedence.
  6. Streamlined Backend Code:

    • Refactored the backend logic to reduce duplication and enhance maintainability, particularly in the REST API codebase. We’ve combined multiple functions into a single process to handle map data responses, minimizing redundancy and improving efficiency.

Bug Fixes:

  • Meta Saving: Resolved an issue where map attributes wouldn’t save properly when placed inside nested blocks, ensuring consistent meta data saving across all post types.
  • Block Initialization Defaults: Corrected the handling of default map settings (like disableZoom, disableUIButtons) when not explicitly set in the block editor.

This release lays a strong foundation for future features and improvements, ensuring better flexibility for developers and site owners working with Google Maps in WordPress. As always, feedback is welcome, and we’ll be submitting this release for review in the official WordPress Plugin Repository soon. :D

Full Changelog: v0.422...v0.424