This is a migrated thread and some comments may be shown as answers.

Issues integrating an Esri map (JS API)

4 Answers 163 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Steven
Top achievements
Rank 2
Steven asked on 27 Jun 2015, 02:12 PM

Greetings, all! I'm attempting to develop a hybrid mobile app using Kendo Mobile UI (both through AppBuilder, and locally on WebStorm with the appbuilder CLI), and I'm having a heck of a time trying to get Esri's Javascript to load. It utilizes the Dojo framework, which is (apparently?) interacting poorly with what I assume is the Require.js loader in Kendo's framework.

 

Does anyone have any experience or ideas? I had some success in the past importing vanilla Require.js and tricking it into loading the AMD-esque modules Esri uses, but it resulted in unreliable performance/loading on different platforms...

4 Answers, 1 is accepted

Sort by
0
Anton Dobrev
Telerik team
answered on 30 Jun 2015, 12:23 PM
Hello Steven,

The dependency injection is handled by the ESRI JS SDK, so there is no need to import RequireJS or any other module loader in your project.

We identified an issue in the AppBuilder desktop simulator which is fixed in this sample app (see js/fixUrls.js). This should be fix the issue with loading the SDK dependencies.

Also, the sample app works with the included versions of Kendo UI (either the mobile version or the all version).

Let me know if further questions arise.

Regards,
Anton Dobrev
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
Jaimin
Top achievements
Rank 1
answered on 23 May 2016, 07:40 AM

I am getting error while implementing esri maps in telerik mobile app as follow : 

Error: scriptError
    at Error (native)
    at d (https://js.arcgis.com/3.15/init.js:5:382)
    at HTMLScriptElement.<anonymous> (https://js.arcgis.com/3.15/init.js:30:159)(anonymous function) @ console-via-logger.js:174(anonymous function) @ init.js:31(anonymous function) @ init.js:9a @ init.js:5r.signal @ init.js:9(anonymous function) @ init.js:30
console-via-logger.js:174 src: dojoLoader
console-via-logger.js:174 info: ["local://js.arcgis.com/3.15/esri/nls/jsapi_en-us.js", Event]
console-via-logger.js:174 .
console-via-logger.js:174 Error: scriptError
    at Error (native)
    at d (https://js.arcgis.com/3.15/init.js:5:382)
    at HTMLScriptElement.<anonymous> (https://js.arcgis.com/3.15/init.js:30:159)(anonymous function) @ console-via-logger.js:174(anonymous function) @ init.js:31(anonymous function) @ init.js:9a @ init.js:5r.signal @ init.js:9(anonymous function) @ init.js:30
console-via-logger.js:174 src: dojoLoader
console-via-logger.js:174 info: ["local://js.arcgis.com/3.15/dojox/gfx/svg.js", Event]

0
Jaimin
Top achievements
Rank 1
answered on 23 May 2016, 07:41 AM
Then how to solve this error?
0
Anton Dobrev
Telerik team
answered on 25 May 2016, 12:33 PM
@ Jaimin

I managed to reproduce the issue you reported in a mobile app when running it in the AppBuilder simulator. The issue should not appear when the app is deployed on an actual device.

The issue is connected to the way the ESRI dependencies are loaded in the simulator (some of them are fetched from local://  instead of http(s):// scheme).

To fix the issue and be able to work with this library in the simulator:

- Refer to the sample app in my previous reply and import the code in js/fixUrls.js
-
Download and install the ESRI JS SDK locally in the app

I hope that this helps.

Regards,
Anton Dobrev
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
General Discussion
Asked by
Steven
Top achievements
Rank 2
Answers by
Anton Dobrev
Telerik team
Jaimin
Top achievements
Rank 1
Share this question
or