Skip to Content
0

how to set Custom CSS and Geojson location in javascript

Nov 29, 2016 at 10:06 AM

109

avatar image
Former Member

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Tammy Powlas
Nov 29, 2016 at 10:23 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.

0
avatar image
Former Member Nov 30, 2016 at 05:42 AM
0

Hi,

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

Thanks,

Nithyanandam

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.

0
avatar image
Former Member Nov 30, 2016 at 09:17 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.

0