Revize ac6504c1
Přidáno uživatelem Ondřej Fibich před asi 5 roky(ů)
application/views/devices/show.php | ||
---|---|---|
</div>
|
||
<script type="text/javascript">
|
||
$(document).ready(function () {
|
||
mapycz_dev('ap_gmap', <?php echo $gpsx ?>, <?php echo $gpsy ?>);
|
||
(function map_async_loader() {
|
||
if ('Loader' in window) {
|
||
Loader.async = true;
|
||
Loader.load(null, null, function () {
|
||
mapycz_dev('ap_gmap', <?php echo $gpsx ?>, <?php echo $gpsy ?>);
|
||
});
|
||
} else {
|
||
setTimeout(map_async_loader, 1000);
|
||
}
|
||
})();
|
||
});
|
||
</script>
|
||
<?php endif; ?>
|
Také k dispozici: Unified diff
Fixes #1121: Fix slow loading of mapy.cz if Loader not fetched (e.g. slow connection or offline). The mapy.cz API is loaded asynchronously now. The map loading is waiting in a loop until it is loaded.