0 comments on “Saving Custom Map Markers”

Saving Custom Map Markers

When editing a location with custom map markers available, the custom marker is not saved.

Steps To Reproduce

  1. Make sure the Experience add on is active.
  2. Edit an existing location.
  3. Change the map marker via the map marker selector, a built-in marker is fine.
  4. Save the location.

The map marker is not changed or saved to the database.

Resolution

Have \SLP_Admin_Locations_Actions::save_edited_location to call \SLP_Data_Extension::set_cols(true) after reading the pre-existing record in order to force the valid extended data fields to the full array.

Map Marker Icons AWOL

Some users are not seeing the proper map marker urls (schmiggitty).

Home Marker

Saved: https://local.storelocatorplus.com/schmiggitty_at_gmail_dot_com/wp-content/mu-plugins/store-locator-le/images/icons/bulb_yellow.png (empty)
Corrected: https://local.storelocatorplus.com/wp-content/mu-plugins/store-locator-plus/images/icons/bulb_yellow.png

End Marker

Saved: https://local.storelocatorplus.com/schmiggitty_at_gmail_dot_com/wp-content/mu-plugins/store-locator-le/images/icons/bulb_azure.png (empty)
Corrected: https://local.storelocatorplus.com/wp-content/mu-plugins/store-locator-plus/images/icons/bulb_azure.png

Dev notes

https://storelocatorplus.youtrack.cloud/issue/SLP-11/Map-Marker-Icons-AWOL

On staging (and production I assume) these both work as expected. The long URL with the customer ID works.

google.maps.Marker is deprecated

You will see this message in Generate Embed when reviewing the interface for any user.

As of February 21st, 2024, google.maps.Marker is deprecated. Please use google.maps.marker.AdvancedMarkerElement instead. At this time, google.maps.Marker is not scheduled to be discontinued, but google.maps.marker.AdvancedMarkerElement is recommended over google.maps.Marker. While google.maps.Marker will continue to receive bug fixes for any major regressions, existing bugs in google.maps.Marker will not be addressed. At least 12 months notice will be given before support is discontinued. Please see https://developers.google.com/maps/deprecations for additional details and https://developers.google.com/maps/documentation/javascript/advanced-markers/migration for the migration guide.

Dev Notes

https://storelocatorplus.youtrack.cloud/issue/SLP-14/google.maps.Marker-is-deprecated