App.accessRule and openstreetmap


iam trying to allow my mobile app to load images from openstreetmap
i added this to my mobile-config.js

App.accessRule('*openstreetmap.*', { external: true });

but it is still not working what iam doing wrong?

I think it should be *://* or similar? The rule is not a random glob expression, refer to Cordova documentation to see what works for you.

the problem is that openstreetmap is loadinf rom different sub domains and different top level domains.

for example:

but i will look into the cordova guide

Have you tried with

App.accessRule('http://*.openstreetmap.*', { external: true });


The issue seems to be that there is not a single subdomain, but the rabbit hole goes deeper :wink:

This works for me on iOS:


This is in combination with the corresponding tile URL in the following format:

var osmUrl = 'http://{s}{z}/{x}/{y}.png';

How and where do you define the tile URL? Or is it entirely dynamic?