Skip to content

Commit 37e457b

Browse files
committed
Google maps block: Add cachebuster to SVG urls
1 parent df142ea commit 37e457b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mu-plugins/blocks/google-map/src/utilities/google-maps-api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export function combineDuplicateLocations( rawMarkers ) {
8383
*/
8484
export function assignMarkerReferences( map, maps, infoWindow, wpEvents, rawIcon, blockStyle ) {
8585
const icon = {
86-
url: rawIcon.imagesDirUrl + `/map-marker-${ blockStyle }.svg`,
86+
url: rawIcon.imagesDirUrl + `/map-marker-${ blockStyle }.svg?v=2`,
8787
size: new maps.Size( rawIcon.markerHeight, rawIcon.markerWidth ),
8888
anchor: new maps.Point( 34, rawIcon.markerWidth / 2 ),
8989
scaledSize: new maps.Size( rawIcon.markerHeight / 2, rawIcon.markerWidth / 2 ),
@@ -148,7 +148,7 @@ function openInfoWindow( infoWindow, map, markerObject, rawMarker ) {
148148
*/
149149
export function clusterMarkers( map, maps, markers, rawIcon, blockStyle ) {
150150
const clusterIcon = {
151-
url: rawIcon.imagesDirUrl + `/cluster-background-${ blockStyle }.svg`,
151+
url: rawIcon.imagesDirUrl + `/cluster-background-${ blockStyle }.svg?v=2`,
152152
size: new maps.Size( rawIcon.clusterHeight, rawIcon.clusterWidth ),
153153
anchor: new maps.Point( rawIcon.clusterHeight, rawIcon.clusterWidth ),
154154
scaledSize: new maps.Size( rawIcon.clusterHeight, rawIcon.clusterWidth ),

0 commit comments

Comments
 (0)