cancel
Showing results for 
Search instead for 
Did you mean: 

how to set Custom CSS and Geojson location in javascript

former_member241445
Participant
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member265529
Contributor
0 Kudos

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

former_member241445
Participant
0 Kudos

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.

former_member194504
Active Contributor
0 Kudos

Hi,

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

Thanks,

Nithyanandam

former_member241445
Participant
0 Kudos

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.

TammyPowlas
Active Contributor
0 Kudos

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

former_member241445
Participant
0 Kudos

hey,Tammy.

I'm very glad you reply me.I already use this method,http://<boserver>:<port>/image1.jpg,

but it just can hide the picture and get it.but the css file and geojson file can't use javascript to set.

thanks.

Jing.