Here is a script error which makes the getTileUrl function invalid (not properly closed) so that the app could not detect it.

The error is: 1. The last 2 double-quote characters are not ASCII characters for JS strings, they are (“) and (”), not the (") .2. The last double-quote character is useless and invalid and should be removed.

What's more, after a simple review of the website, there is something else you should edit to make the your script logic correct:as shown bellow:

By the way:It is suggested to use the Online Map Editor tool to configure, debug and preview a custom online map before importing to the app, which is more convenient.

How to Use?Visit the tool with a web browser at http://duweis.com/tool/editor/mapsource.htmlSwitch to the Javascript tab (on the left) and Preview tab (on the right) > choose "Google Road" in the map drop list > zoom in and pan the preview map to the region that you are interested and your custom map has content for > choose "Custom Map" in the map drop list, paste your scripts to the text box on the left, and click the "refresh" button (on the right) to test your script and preview the map.

If the script works, you should see the map content displayed in the preview box > Now switch to the "QRCode" tab on the right, and click "generate" to get a QRCode image > Lanuch the app on your iphone/ipad > go to User Data > add > Import From QRCode > point the camera to the qr-code and start importing.

What's more, for these realtime maps, since the underneath map engine you are using (the Apple's MapKit) caches map content without our control, which means even if you have set the "Cache Expire" of this map as "1 Minute", the map would not update the content automatically 1 minute later, and you have to manually select the map in User Data or Custom Maps list, and choose "Reload On Map" for a content refresh.

Thank you for your quick response. The script worked fine. I appreciate the wonderful application and your wonderful support.I also thank you for the guidance of the map editor. I did not know about this function. I will attach the generated QR-code.