Skip to Content

how to set Custom CSS and Geojson location in javascript

Dear,

DS report can view in BI platform,But I want hiden the source file of CSS and Geojson ,and I still can use it. In fact,if I hiden the source file,I can't use it for my report.

I have a thought,if I put those file in servise,maybe I can use it through url,and I realized in image,but I can't set Custom CSS and Geojson.

IMAGE_1.setImage(url);

everybody can help me?

Thanks,

Jing.

4l.png (17.2 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Nov 29, 2016 at 10:23 AM

    Hello, have you searched for this question? I searched and found this: https://archive.sap.com/discussions/thread/3698365

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 30, 2016 at 05:42 AM

    Hi,

    You sure about having proper access to the file from the current URL in your server.

    Thanks,

    Nithyanandam

    Add a comment
    10|10000 characters needed characters exceeded

    • Hey,Nithyanandam.

      Yes.I'm sure.

      var bookmark = Bookmark.saveBookmark("URL");

      var url = Bookmark.getBookmarkUrl(id).substring(7);

      url="http://"+url.substring(7,url.indexof("/")+1);

      image.setimage(url+"DS/img.png");

      this is my code,and I can realize image in server,but the custom.css file,I don't known how to use javascript to set.and geojson is so.

      Thanks.

      Jing.

  • Posted on Nov 30, 2016 at 09:17 AM

    Hi Jing Zhang,

    You can use data URI instead of using url for image.

    For CSS file and geoJSON file in a separate location or folder in lauchpad instead of hiding them.

    So user can only view dashboard application in his folder.

    Thanks,

    Poovarasan

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Poovarasan.

      I know you mean thst save the css file in lauchpad,and I can use the url of css in lauchpad to get css.

      But the geojson ,I just can get it,and I can't match it the geojson property.

      By the way , CSS file and geoJSON file in a separate location,is mean I save they in a folder where user can't see,but have the access to son file?

      Thanks,

      Jing.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.