Skip to content

Commit

Permalink
Google maps block: Add cachebuster to SVG urls
Browse files Browse the repository at this point in the history
  • Loading branch information
ryelle committed Dec 6, 2024
1 parent df142ea commit 37e457b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mu-plugins/blocks/google-map/src/utilities/google-maps-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function combineDuplicateLocations( rawMarkers ) {
*/
export function assignMarkerReferences( map, maps, infoWindow, wpEvents, rawIcon, blockStyle ) {
const icon = {
url: rawIcon.imagesDirUrl + `/map-marker-${ blockStyle }.svg`,
url: rawIcon.imagesDirUrl + `/map-marker-${ blockStyle }.svg?v=2`,
size: new maps.Size( rawIcon.markerHeight, rawIcon.markerWidth ),
anchor: new maps.Point( 34, rawIcon.markerWidth / 2 ),
scaledSize: new maps.Size( rawIcon.markerHeight / 2, rawIcon.markerWidth / 2 ),
Expand Down Expand Up @@ -148,7 +148,7 @@ function openInfoWindow( infoWindow, map, markerObject, rawMarker ) {
*/
export function clusterMarkers( map, maps, markers, rawIcon, blockStyle ) {
const clusterIcon = {
url: rawIcon.imagesDirUrl + `/cluster-background-${ blockStyle }.svg`,
url: rawIcon.imagesDirUrl + `/cluster-background-${ blockStyle }.svg?v=2`,
size: new maps.Size( rawIcon.clusterHeight, rawIcon.clusterWidth ),
anchor: new maps.Point( rawIcon.clusterHeight, rawIcon.clusterWidth ),
scaledSize: new maps.Size( rawIcon.clusterHeight, rawIcon.clusterWidth ),
Expand Down

0 comments on commit 37e457b

Please sign in to comment.