Skip to content

Commit 61971b4

Browse files
committed
Swapped SVG markers in category markers example with PNGs because of issue with IE11
1 parent dc4b3e2 commit 61971b4

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

dist/assets/img/blue-marker.png

1.2 KB
Loading

dist/assets/img/red-marker.png

1.2 KB
Loading

dist/assets/js/plugins/storeLocator/jquery.storelocator.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,14 +722,16 @@
722722
if(typeof markerWidth !== 'undefined' && typeof markerHeight !== 'undefined') {
723723
markerImg = {
724724
url: markerUrl,
725-
size: new google.maps.Size(markerWidth, markerHeight)
725+
size: new google.maps.Size(markerWidth, markerHeight),
726+
scaledSize: new google.maps.Size(markerWidth, markerHeight)
726727
};
727728
}
728729
// Default marker dimensions: 32px x 32px
729730
else {
730731
markerImg = {
731732
url: markerUrl,
732-
size: new google.maps.Size(32, 32)
733+
size: new google.maps.Size(32, 32),
734+
scaledSize: new google.maps.Size(32, 32)
733735
};
734736
}
735737

dist/assets/js/plugins/storeLocator/jquery.storelocator.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/category-markers-example.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
<div id="page-header">
1313
<h1>Using Chipotle as an Example</h1>
1414
<p>I used locations around Minneapolis and the southwest suburbs. So, for example, Edina, Plymouth, Eden Prarie, etc. would be good for testing the functionality.
15-
You can use just the city as the address - ex: Edina, MN.</p>
15+
You can use just the city as the address - ex: Edina, MN. <strong>Note: SVGs are not used in this example because there seems to be a bug in IE11 and they aren't
16+
displayed. SVG path notation isn't used because it <a href="https://code.google.com/p/gmaps-api-issues/issues/detail?id=6358" target="_blank">looks awful</a> with HDPI devices.</strong></p>
1617
</div>
1718

1819
<div class="bh-sl-form-container">
@@ -42,8 +43,8 @@ <h1>Using Chipotle as an Example</h1>
4243
$(function() {
4344
$('#map-container').storeLocator({
4445
catMarkers : {
45-
'Restaurant' : ['assets/img/red-marker.svg', 32, 32],
46-
'Cafe' : ['assets/img/blue-marker.svg', 32, 32]
46+
'Restaurant' : ['assets/img/red-marker.png', 32, 32],
47+
'Cafe' : ['assets/img/blue-marker.png', 32, 32]
4748
}
4849
});
4950
});

src/js/jquery.storelocator.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,14 +718,16 @@
718718
if(typeof markerWidth !== 'undefined' && typeof markerHeight !== 'undefined') {
719719
markerImg = {
720720
url: markerUrl,
721-
size: new google.maps.Size(markerWidth, markerHeight)
721+
size: new google.maps.Size(markerWidth, markerHeight),
722+
scaledSize: new google.maps.Size(markerWidth, markerHeight)
722723
};
723724
}
724725
// Default marker dimensions: 32px x 32px
725726
else {
726727
markerImg = {
727728
url: markerUrl,
728-
size: new google.maps.Size(32, 32)
729+
size: new google.maps.Size(32, 32),
730+
scaledSize: new google.maps.Size(32, 32)
729731
};
730732
}
731733

0 commit comments

Comments
 (0)