=== GravityView - Maps === Tags: gravityview Requires at least: 4.7 Tested up to: 6.7 Stable tag: trunk Contributors: katzwebservices, luistinygod, soulseekah, mrcasual, bordoni License: GPL 3 or higher Requires PHP: 7.2.0 Display your Gravity Forms entries on a map. == Description == ### To set up: * Visit the GravityKit Settings page in the WordPress admin sidebar * Click on the GravityView Maps tab * Enter your Google Maps API key * Use existing View connected to a form with an Address field * Switch View Type, select Maps * Add Address parent field to the Address zone * Save the View * Voilà ### Map Icons GravityView Maps uses map icons from the [Maps Icons Collection by Nicolas Mollet](https://mapicons.mapsmarker.com). By default, a pre-selection of about 100 icons (from more than 1,000 available icons) has been added to the plugin. == Installation == 1. Upload plugin files to your plugins folder, or install using WordPress' built-in Add New Plugin installer 2. Activate the plugin 3. Configure "Maps" via the Maps metabox when editing a View == Changelog == = 3.2.6 on November 21, 2024 = This hotfix update addresses a non-critical PHP notice in WordPress 6.7 and newer. #### 🐛 Fixed * PHP notice in WordPress 6.7 caused by initializing product translations too early. #### 🔄 Updated * [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.21. = 3.2.5 on November 8, 2024 = This update fixes a compatibility issue with GravityView version 2.31 and newer. #### 🐛 Fixed * Compatability with GravityView version 2.31 and newer. = 3.2.4 on November 6, 2024 = This release fixes a rendering issue and corrects the URL structure for markers linking to single entries in embedded Views. #### 🐛 Fixed * Zoomed-out map view showed both clusters and individual markers. * Map markers in embedded Views incorrectly linked to single entries using the View's custom post URL instead of the parent page/post URL. #### 🔧 Updated * [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.20. #### 💻 Developer Updates * Added the ability to use `wp.hooks.addAction()` and `wp.hooks.removeAction()` for controlling marker functionality and other aspects of the Google Maps script. = 3.2.3 on September 12, 2024 = This update fixes performance issues causing the View and View editor to time out. #### 🐛 Fixed * View and View editor timing out due to inefficient database queries. #### 🔧 Updated * [Foundation](https://www.gravitykit.com/foundation/) and [TrustedLogin](https://www.trustedlogin.com/) to versions 1.2.18 and 1.9.0, respectively. = 3.2.2 on August 25, 2024 = This update addresses a fatal error related to the internal caching process. #### 🐛 Fixed * Fatal error that could occur during View loading due to a caching issue. = 3.2.1 on August 19, 2024 = This update resolves a fatal error related to multiple geolocation data sources. #### 🐛 Fixed * Fatal error due to an undefined variable. = 3.2.0 on August 19, 2024 = This release introduces support for [multiple geolocation data sources](https://docs.gravitykit.com/article/304-setting-up-geocoding-services#Support-For-Other-Geolocation-Add-Ons-MhQJ5), ensuring seamless map display of entries even when forms are updated to use different address autocompletion and geolocation add-ons. #### 🚀 Added * Support for multiple geolocation data sources configured for Address fields, including Gravity Forms Address Autocomplete by Gravity Wiz and the Geolocation Add-On by Gravity Forms. * Data migration between geolocation data sources, consolidating data when multiple form add-ons have been used for geolocation. #### 🚀 Improved * The Search Bar now includes additional radius search distance values. #### 🔧 Updated * [Foundation](https://www.gravitykit.com/foundation/) and [TrustedLogin](https://www.trustedlogin.com/) to versions 1.2.17 and 1.8.0, respectively. = 3.1.7 on May 22, 2024 = This release addresses several bugs and updates internal components to improve performance and compatibility. #### 🚀 Added * Missing zoom levels 18–21 for the "Maximum Zoom" View setting. #### 🐛 Fixed * Fatal error when checking Google Maps API key on PHP 8.1. * Multiple markers for a single entry not displaying on the map. * Multiple address fields triggering geocoding when using address autocompletion add-ons from Gravity Wiz and Gravity Forms. #### 🔧 Updated * [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.15. - Added an option to subscribe to GravityKit's newsletter from the Manage Your Kit screen. - Added a setting in GravityKit > Settings > GravityKit to specify the GravityKit menu position in the Dashboard. - Improved internal check for product updates that could still interfere with third-party plugin updates. Thanks, Aaron! - Fixed a bug that prevented WordPress from loading third-party plugin translations after their updates. Thanks, Jérôme! - Fixed a bug that hid third-party plugin updates on the Plugins and Updates pages. - Success message now shows correct product name after activation/deactivation. - Resolved a dependency management issue that incorrectly prompted for a Gravity Forms update before activating, installing, or updating GravityKit products. = 3.1.6 on March 29, 2024 = This update fixes a PHP 8.2 deprecation notice and a fatal error when customizing themes or editing posts/pages. #### 🐛 Fixed * PHP 8.2 deprecation notice. * Fatal error when customizing themes or editing posts/pages. = 3.1.5 on March 25, 2024 = This release addresses issues related to automatic address geocoding and merge tag processing, fixes JavaScript errors, and restricts the loading of extension's assets to specific locations. #### 🐛 Fixed * Automatic address geocoding no longer happens outside the View. * Merge tags are now correctly processed inside the marker's info window. * Form fields with latitude and longitude coordinates can once again be specified via the `gk/gravitymaps/markers/coordinates/fields-ids` filter. * JavaScript errors on Gravity Forms admin screens and when loading the View have been resolved. #### ✨ Improved * Extension's JavaScript files are now only loaded where needed. = 3.1.4 on March 12, 2024 = This release introduces a new feature that allows for the automatic geocoding of entries. It also improves performance and addresses critical issues related to pagination, the saving of Views, and compatibility with the Multiple Forms extension. #### 🚀 Added * A setting to control the automatic geocoding of entries when they are missing latitude and longitude coordinates. #### 🐛 Fixed * Pagination links not working. * Fatal error when saving Views. * Performance issues. * Fatal error when the Maps layout is used in combination with the Multiple Forms extension. __Developer Updates:__ * Added: `gk/gravitymaps/marker/auto-geocode` filter to control whether the entry is automatically geocoded if no latitude/longitude coordinates are found. = 3.1.3 on March 5, 2024 = The release improves functionality by adding new features, resolving display issues, and updating internal components to enhance performance and compatibility. #### 🚀 Added * A setting to hide the Geolocation Radius Unit that is not the default one being used. * Google Maps API key check verifies if the Places API service is enabled * Pagination when using the "Search as map moves" feature. #### ✨ Improved * When available, coordinates from Gravity Wiz's Address Autocomplete perk are reused for entries not previously geocoded by GravityView Maps. #### 🐛 Fixed * An issue where Default Unit field was not being displayed when using List view or Table view. * Map disappearance when "Hide view data" was checked and no entries were found upon moving the map. #### 🔧 Updated * [Foundation](https://www.gravitykit.com/foundation/) and [TrustedLogin](https://www.trustedlogin.com/) to versions 1.2.11 and 1.7.0, respectively. - GravityKit product updates are now showing on the Plugins page. - Database options that are no longer used are now automatically removed. - Transients are now set and retrieved correctly when using object cache plugins. - GravityKit products that are already installed can now be activated without a valid license. - Fixed a JavaScript warning that occurred when deactivating license keys and when viewing products without the necessary permissions. - Resolved PHP warning messages on the Plugins page and Updates pages, and when deactivating the last active product with Foundation installed. = 3.1.2 on January 12, 2024 = This update addresses issues with Multiple Forms and Autocomplete fields. #### 🐛 Fixed * A fatal error that occurred when using ZIP Code as the Join Field for Multiple Forms. * A JavaScript error that happened when using the Autocomplete field without the Places API enabled. * A JavaScript error related to using Autocomplete on the Address Form field. = 3.1.1 on December 27, 2023 = #### 🐛 Fixed * Custom map icons based on specific field values, also known as [choice-based markers](https://docs.gravitykit.com/article/828-about-custom-map-icons-or-markers), were not displaying on the map. * JavaScript errors in the Gravity Forms form editor caused by GravityView Maps. #### 🔄 Updated * [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.6. = 3.1 on November 9, 2023 = * Added: [Request a user's location to trigger a radius search](https://docs.gravitykit.com/article/973-radius-seach-request-location) * Added: "Request Location" setting, enabling a View to immediately request a user’s location when the page loads (defaults to disabled) - Created new "Radius Search Settings" settings section * Improved: Support for displaying multiple maps on the same page * Fixed: Fatal error when Views have custom info box content __Developer Updates:__ * Added: `gk/gravitymaps/markers/coordinates/fields-ids` [Filter to use latitude and longitude fields](https://docs.gravitykit.com/article/300-how-can-i-use-the-latitude-and-longitude-form-fields-to-position-map-markers) * Added: `gk/gravitymaps/maps/service-factory/get-map-service-instance-for-view` filter to modify the map service instance for a View * Added: `gk/gravitymaps/maps/service-factory/get-map-service-class-for-view` filter to modify the map service class for a View * Added: JavaScript hooks for Maps and Markers - `gk.maps.controllers.marker.before_process_map` - `gk.maps.controllers.marker.after_process_map` - `gk.maps.controllers.marker.create` - `gk.maps.controllers.marker.after_create` - `gk.maps.controllers.marker.on_view_entry_mouse_enter` - `gk.maps.controllers.map.bind_observer_to_maps` - `gk.maps.controllers.map.update_data` - `gk.maps.controllers.map.get_data` - `gk.maps.controllers.map.update_settings` - `gk.maps.controllers.map.get_settings` - `gk.maps.controllers.map.create_map` - `gk.maps.controllers.map.after_create_map` - `gk.maps.controllers.map.set_zoom` - `gk.maps.controllers.map.set_center` - `gk.maps.controllers.map.get_maps` - `gk.maps.controllers.map.get_search_maps` * Deprecated: `gravityview/maps/markers/lat_long/fields_id` filter (use `gk/gravitymaps/markers/coordinates/fields-ids` instead) * Deprecated: `gravityview/maps/render/google_api_key` filter (use `gk/gravitymaps/map-services/google-maps/api_key` instead) = 3.0.3 on October 26, 2023 = * Fixed: Merge tags not working in the Map Info Box content field * Fixed: PHP 8.1+ deprecation notice = 3.0.2 on October 25, 2023 = * Fixed: Views created from the Business Map Listing preset did not have any fields configured * Fixed: PHP 8.2+ deprecation notice = 3.0.1 on October 19, 2023 = * Fixed: Business Map Listing preset not properly loading when creating a new View * Fixed: Incorrect image scaling in the marker info box * Fixed: Entry Map field not working inside the Single Entry layout = 3.0 on September 19, 2023 = * Fixed: UI elements not showing on the Map when JavaScript assets are not loaded in the correct order * Fixed: Entries and pins stop loading after seeing no results when using the "search as map moves" feature * Fixed: Server error when using the "search as map moves" feature if the View's "direct access" setting is not set to "public" * Fixed: CSS styling issue affecting map zoom controls * Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.4 __Developer Updates:__ * Added: CSS class `gk-hide-individual-entries` to the `gv-map` container when no fields are configured in the Map View * Modified: - Template files updated to use the GravityView 2.0 template structure - Templates now have access to the `$gravityview` and `\GV\Template_Context` global objects - Template location changed from `templates/` to `templates/views/map/` - Base template for the Map View renamed from `map-view.php` to `map.php` * Renamed hooks while maintaining backward compatibility: - `gravityview_entry_class` to `gravityview/template/map/entry/class` - `gravityview_map_body_before` to `gravityview/template/map/body/before` - `gravityview_map_body_after` to `gravityview/template/map/body/after` - `gravityview_map_entry%sbefore` to `gravityview/template/map/entry%sbefore` - `gravityview_map_entry%safter` to `gravityview/template/map/entry%safter` - `gravityview_map_render_div` to `gk/gravitymaps/render/map-canvas` = 2.2.3 on September 8, 2023 = * Improved: Support for RTL languages * Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.2 = 2.2.2 on August 8, 2023 = * Fixed: Geolocation search was not properly setting necessary mapping parameters for both "Any" and "All" search modes * Fixed: A search page with no results did not show a map, making it impossible for users to scroll the map to search different areas * Fixed: Prevent a couple of errors when using older versions of GravityView with Maps = 2.2.1 on July 27, 2023 = * Improved: Minimum, Maximum and Default Zoom setting fields now restrict each other's values to prevent invalid configurations * Fixed: Geolocation search params are properly respected on both Any and All search modes * Fixed: Geolocation Radius label was not displayed if the field is not empty * Fixed: Default Zoom is now applied to the map when the View is loaded * Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.1.1 = 2.2 on July 6, 2023 = * Fixed: A notice requesting REST API access shows up for all View types, not just Views with maps * Fixed: The front-end notice alerting administrators that the REST API setting is disabled was not worded clearly * Fixed: Using custom longitude and latitude values on forms without an Address field * Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.1.0 __Developer Notes:__ * Added: `Marker::from_address_field()` and `Marker::from_coordinate_fields()` methods to construct a Marker object from an Address field or Longitude/Latitude fields * Added: `base.js` file to the `assets/js` directory, used to handle global JS hooks * Added: JavaScript filter to modify the options used to build a Marker: `gk.maps.marker_options` * Added: JavaScript action after a Marker is added: `gk.maps.after_add_marker` * Modified: Renamed many JavaScript hooks to use standard GravityKit naming structure: - `gravitykit/maps/autocomplete_field_id` => `gk.maps.autocomplete_field_id` - `gravitykit/maps/autocomplete_input_id` => `gk.maps.autocomplete_input_id` - `gravitykit/maps/autocomplete_field_init` => `gk.maps.autocomplete_field_init` - 'gravitykit_maps_invalid_coordinates' => `gk.maps.invalid_map_coordinates` - `gravitykit_maps_after_process_map_markers` => `gk.maps.after_process_map_markers` - `gravitykit_maps_beforeInit` => `gk.maps.before_maps_init` - `gravitykit_maps_afterInit` => `gk.maps.after_maps_init` - `gravitykit_maps_init_maps` => `gk.maps.init_maps` - `gravitykit_maps_before_init_map` => `gk.maps.before_init_map` - `gravitykit_maps_after_init_map` => `gk.maps.after_init_map` - `gravitykit_maps_before_process_map_markers` => `gk.maps.before_process_map_markers` - `gravitykit_maps_after_process_map_markers` => `gk.maps.after_process_map_markers` - `gravitykit_maps_getMaps` => `gk.maps.get_maps` - `gravitykit_maps_getSearchMaps` => `gk.maps.get_search_maps` = 2.1 on May 16, 2023 = * Improved: Accessibility of the temporary notice displayed during the executing of an Ajax request * Fixed: Preview image for the "Business Map Listing" form preset in the View editor * Fixed: Incorrect map centering when geolocation radius value is left empty during search * Fixed: Incompatibility with some plugins/themes that use Laravel components * Fixed: PHP warning messages that occurred under specific conditions * Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.0.12 = 2.0 on April 12, 2023 = We’re so excited to announce the release of Maps 2.0. [Read the Maps 2.0 announcement blog post](https://www.gravitykit.com/announcing-maps-2-0/). There are so many great new features: * [Geolocation radius search](https://docs.gravitykit.com/article/925-how-to-enable-radius-search) - Users can now search for entries within a certain radius of their current location or a specific location * [Draggable maps with "Redo search in map" and "Search as map moves"](https://docs.gravitykit.com/article/927-search-entries-as-map-moves) - Users can now search using the map itself! Map markers will refresh in real-time as you click and drag the map to different locations. * [Address field autocomplete](https://docs.gravitykit.com/article/926-enabling-autocomplete-for-the-gravity-forms-address-field) - Make it easy for users to enter addresses using address autocomplete. Enable this feature by editing your form and checking the new “Enable geolocation autocomplete” checkbox in the settings of Address fields. * Faster maps - We’ve rewritten our map rendering to dramatically improve performance * Added: "International Autocomplete Filter" setting to restrict the countries that are used for address autocomplete * Modified: Draggable maps functionality requires Views have REST API enabled * Modified: The "Redo search in map" and "Search as map moves" settings are now enabled by default __Developer Updates:__ * Added: Wrapping `