![](/img/trans.png)
[英]Unable to show OpenStreepMap in Tizen wearable web application
[英]Unable to load a external javascript file in a Tizen Web application
我正在嘗試做一些非常基本的事情-包括一個外部JS文件,但是我無法使其正常工作。
相關HTML
<head>
<script src="https://openlayers.org/en/v4.1.1/build/ol.js"></script>
</head>
config.xml中
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://yourdomain/dezedan" version="1.0.0" viewmodes="maximized">
<access origin="*" subdomains="true"/>
<access origin="https://openlayers.org/" subdomains="true"/>
<tizen:application id="iFnT8pQIzT.dezedan" package="iFnT8pQIzT" required_version="3.0"/>
<content src="index.html"/>
<feature name="http://tizen.org/feature/screen.size.all"/>
<icon src="icon.png"/>
<name>test</name>
<tizen:privilege name="http://tizen.org/privilege/internet"/>
<tizen:privilege name="http://tizen.org/privilege/application.launch"/>
<tizen:profile name="wearable"/>
</widget>
我嘗試過的東西包括在config.xml中(未成功)
<access origin="http://openlayers.org/" subdomains="true"/>
<access origin="https://openlayers.org/en/v4.1.1/build/ol.js" subdomains="true"/>
<access origin="http://openlayers.org/en/v4.1.1/build/ol.js" subdomains="true"/>
據我所知,我可以正確地做所有事情。 但顯然我缺少了一些東西! 如果有人能闡明我所缺少的內容,將不勝感激。
用這個
<script src="https://cdnjs.cloudflare.com/ajax/libs/ol3/4.1.1/ol.js"</script>
代替
<script src="https://openlayers.org/en/v4.1.1/build/ol.js"></script>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.