Skip to Content
0

Load ESRI Javascript Library in SAP Web IDE on HCP

Dec 13, 2016 at 10:51 PM

63

avatar image

I am trying to load ESRI Javascrit library in SAP Web Ide on HCP. I can load the library and run it successfully on my local. But as soon as I deploy it on the HCP portal and run it with other applications, it breaks them (negative cache issue), details below:

1) I have a chart application which loads viz charts. When I load the chart applicationa and try to navigate to the map application then, it gives me an error "already defined" (dojo.js)

2) If I load the map application first and then navigate from the map application to the chart application, then I get a error about negative cache.enter image description here

I think this is because both the library are trying to load "dojo.js".

How can I get around this so that both these applications work when deployed on the HCP Portal.

--> I have already tried with"sap.ui.define()", "sap.ui.getCore().loadLibrary()", "jQuery.sap.loadResourcePath()"Please let me know if anymore information is required.

--> The library is not a part of my project. I am actually using destination to fetch it using the below URL:

https://js.arcgis.com/3.18/init.js

Thanks,

Best Regards,

Deepak

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Guy Roth
Dec 19, 2016 at 10:00 PM
0

Hi Deepak,

My guess is that your custom library doesn't know how to handle multiple instances.

I would try to add a verification in code before loading the library, and load it only if it's not already available in the window.

Regards,

Guy

Share
10 |10000 characters needed characters left characters exceeded