Commit fc8d097b authored by Deployer's avatar Deployer

Fix imagePath url generation in SDK

parent 397d2754
...@@ -68,8 +68,6 @@ ...@@ -68,8 +68,6 @@
<div id='map' class='map'> </div> <div id='map' class='map'> </div>
<script> <script>
window.L.Icon.Default.imagePath = '../dist/v1.4.1/images/images';
try { try {
L.cedarmaps.accessToken = accessToken; L.cedarmaps.accessToken = accessToken;
} catch (err) { } catch (err) {
......
...@@ -60,8 +60,6 @@ ...@@ -60,8 +60,6 @@
<div id="response"></div> <div id="response"></div>
</div> </div>
<script> <script>
window.L.Icon.Default.imagePath ='../dist/v1.6.0/images/';
try { try {
L.cedarmaps.accessToken = accessToken; L.cedarmaps.accessToken = accessToken;
} }
......
...@@ -26,4 +26,7 @@ module.exports = L.cedarmaps; ...@@ -26,4 +26,7 @@ module.exports = L.cedarmaps;
window.L.Icon.Default.imagePath = window.L.Icon.Default.imagePath =
// Detect bad-news protocols like file:// and hardcode // Detect bad-news protocols like file:// and hardcode
// to https if they're detected. // to https if they're detected.
'dist/v1.0.0/images/images'; ((document.location.protocol === 'https:' ||
\ No newline at end of file document.location.protocol === 'http:') ? '' : 'https:') +
'//api.cedarmaps.com/cedarmaps.js/' + 'v' +
require('../package.json').version + '/images/';
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment