简体   繁体   中英

Tizen Web doesn't support CDN?

So I'm developing an app on gear s2 (Tizen) which involves maps. I added the necessary

<script src="http://maps.google.com/maps/api/js?key=API_KEY&sensor=true">

tag for google maps and the

<div id="main-map"></div>

associated with the map as is normally done with a web app. When running the app, it says:

ReferenceError: can't find "google" object

although this is the same way I develop on Ionic's framework or a normal website and it works perfectly. To verify whether this is a problem with Google Maps, I used Here Maps and the same problem occurs. Then I checked with an ordinary CDN like jQuery and it didn't work as well while a local jQuery library works!

Please advise me for a solution for this issue.

Finally!!

The solution is very simple. You'll have to add privileges in config.xml . The following lines should be added:

<tizen:privilege name="http://tizen.org/privilege/internet" />
<access origin="http://googleapis.com" subdomains="true" />
<access origin="http://gstatic.com" subdomains="true" />
<access origin="http://google.com" subdomains="true" />

Hope this helps :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM