Skip to content

Releases: AceMedia/Ace-Google-Map-Block

v0.424

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

v0.422

Choose a tag to compare

@AceMedia AceMedia released this 04 Oct 16:49

Release Notes for Version 0.422.0

New Features:

  • Custom Map Styling:
    • Added support for custom map styles.
    • Included 3 alternative JSON themes.
    • Users can add custom themes by placing JSON files in the /uploads/map-styles/ directory. These themes can be selected from a dropdown menu in the settings.

Full Changelog: v0.421...v0.422

v0.421

Choose a tag to compare

@AceMedia AceMedia released this 04 Oct 03:27

New Features

Zoom Feature:

  • Added a new zoom feature to the Google Map Block plugin, allowing users to control the zoom level of the map directly from the block settings.

Improvements

Code Refactoring:

Refactored README.md:

  • Updated plugin information formatting for better readability.
  • Removed license information to streamline the document.

Block Registration:

  • Refactored block registration to use absolute paths, improving code maintainability.

Google Maps API Key Handling:

  • Refactored the handling of the Google Maps API key and script enqueuing for better security and performance.

.gitignore Update:

  • Updated the .gitignore file to exclude the build folder, ensuring that build artifacts are not committed to the repository.

Full Changelog: v0.420...v0.421

Version 0.420

Choose a tag to compare

@AceMedia AceMedia released this 04 Oct 00:45

Google Map Block Plugin - v0.420 Pre-release Notes

Overview

We are excited to introduce the first release of the Google Map Block plugin! This plugin allows you to seamlessly embed customizable Google Maps into your WordPress block editor, with full integration for adding pins, switching between standard map view and Street View, and real-time location search via Google Places Autocomplete.


Key Features:

  • Google Maps Block Integration:

    • Add fully interactive Google Maps directly within the WordPress block editor.
    • Customize the latitude and longitude to set the map's center.
    • Add a draggable pin to mark specific locations on the map.
  • Street View Support:

    • Toggle between Map view and Google Street View for a more immersive experience.
    • Automatic switching between views via both the map UI (yellow Street View man) and a customizable "Is Street View?" checkbox in the block inspector.
    • Street View Heading and Pitch customization for fine-tuning the perspective.
  • Location Search with Google Places Autocomplete:

    • Integrated Google Places Autocomplete allows users to search and drop pins by selecting suggested places in real-time.
    • The chosen address from Places Autocomplete always takes priority for setting the map’s location and address field.
    • Address field auto-populates from the selected place or through reverse geocoding when the map is clicked.
  • Map Clicks and Reverse Geocoding:

    • Clicking on the map updates the pin location and reverse geocodes the coordinates to display the nearest address in the block inspector.
    • The address is automatically updated based on the last interaction, whether via search or map click.
  • Customizable Inspector Settings:

    • Modify map attributes directly from the WordPress block inspector, including:
      • Latitude and Longitude.
      • Address (read-only, dynamically updated based on interaction).
      • Street View Heading and Pitch (for controlling the view direction).
      • Is Street View? toggle to enable or disable Street View.

Technical Improvements:

  • Real-time Address Updates:

    • Address updates are triggered via Google Places Autocomplete or reverse geocoding based on the user’s interactions, ensuring that the correct address is always displayed in the inspector.
  • Seamless Integration of Map and Street View:

    • Street View automatically syncs its position with the map pin’s coordinates.
    • Toggling between Street View and the map view is fluid, both in the editor and via the map UI controls.
    • The "Is Street View?" checkbox automatically checks or unchecks based on Street View interactions (e.g., entering or exiting Street View).
  • Draggable Pin Feature:

    • Users can drag the pin to a new location, and the coordinates (and address) will automatically update in the editor.

Known Issues:

  • Street View Address Limitation: Street View does not automatically update the address when moving within the view, which avoids potential conflicts with the selected Places address. Use the map pin or search for accurate address updates.

How to Use:

  1. Add the Google Map Block: In the WordPress block editor, add the Google Map Block to your post or page.
  2. Search for a Location: Use the search field to find and set your desired location.
  3. Toggle Street View: Switch to Street View using the map's yellow man or the block inspector checkbox.
  4. Drag the Pin: Click on the map or drag the pin to update the location.
  5. Customize the Map: Use the block inspector to fine-tune the map's center, Street View heading, and pitch.

With the Google Map Block Plugin, you can now easily integrate interactive maps into your WordPress site with fully customizable pins, Street View support, and powerful real-time location search. We hope you enjoy the functionality of this plugin and look forward to your feedback.

Full Changelog: Pre-release...v0.420