Select to view content in your preferred language

Removing Items From Sample Flex Viewer

3014
12
04-05-2010 12:02 PM
TristanKnowlton
Frequent Contributor
Can someone point me in the right direction of where I would go to remove things from the SFV?  For instance I would like to remove the "Feeds" button from the top banner all together.  I would also like to remove the "Powered By ESRI" logo at the bottom right of the flex viewer screen. 

I have looked through various documents in the various folders trying to find where I could do this but I did not see anything. 

I would appreciate any help.  Thanks!
Tags (2)
0 Kudos
12 Replies
PrashanthSukumaran
Emerging Contributor
Hi,

The SampleViewer is a completely customizable and a plug and play kind of system.  You can enhance the viewer by added more widgets.  Widgets are flex modules.  There are two kinds of config xml in sample viewer. 

1) That has configuration for the entire Sample Viewer.
2) Configuration for each widget (These config are present in the widget folder)

The feeds you see are widgets that are in the root folder of the sample viewer (filename: config.xml).  All you have to do is remove the xml definitions under <widgets> from the config.xml and you will see that they are not in the top menu anymore.  Since the menu is build at runtime, you don't have to compile the flex app to see the changes.

As for the ESRI logo, if you add atleast one layer (either to the livemaps or basemaps in config.xml) that points to your Enterprise ArcGIS Server and set the map.logoVisible = false; the logo will be hidden.  They are also many other ways to hide them.  You can search for it in the old forum.

Thanks
Prashanth Sukumaran.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Albertda,

      To remove the feeds menu just open the config.xml and set the visible attribute of the MenuFeeds to false. As far as removing the logo from the map if you have at least on map service that is coming from your server (Not ESRI's) in your map then you can go into the MapManager.mxml and add a line to the config function that looks like this after the map has been var ed of course.

map.logoVisible = false;
0 Kudos
TristanKnowlton
Frequent Contributor
Thanks Prashanth.  I was trying to remove the buttons all together in the banner, I had had success commenting out the specific widgets prior to this.  Since you mentioned the menu is built at runtime, it makes sense to me now.  I was looking in the wrong place in the config.xml. 

In regard to the logo, do you know where exactly the ESRI logo is inserted into the code?  I don't see it anywhere.  I would like to place my own in place of it.

Thanks for your help!!
0 Kudos
RichardDiaz
Regular Contributor
...In regard to the logo, do you know where exactly the ESRI logo is inserted into the code?  I don't see it anywhere.  I would like to place my own in place of it.


Look in the config.xml and change this line to use your own logo.

<logo>com/esri/solutions/flexviewer/assets/images/logo.png</logo>

Rick
0 Kudos
TristanKnowlton
Frequent Contributor
Thanks Rick.  That line is for the icon in the banner.  I'm looking to change the logo in the lower right that says "Powered By ESRI."
0 Kudos
PrashanthSukumaran
Emerging Contributor
Hi,

The logo code is part of the ESRI Flex API.   We have a enterprise license for ArcGIS server, i had to just say hide logo and it was hidden. 

Check this url Robert has answered here.   http://forums.esri.com/Thread.asp?c=158&f=2421&t=287497&mc=35#msgid941067

Thanks
Prashanth
0 Kudos
TristanKnowlton
Frequent Contributor
Thank you Prashanth!  Do you know how to add a new or different logo to display?

Thanks!
0 Kudos
JesseMetcalfe
Emerging Contributor
Hello ,
Did anyone work it out to remove the ESRI Logo and the ESRI web page it opens on mouse click ?

regards,
0 Kudos
TristanKnowlton
Frequent Contributor
I believe this is what worked for me:


In "mapmanager.mxml"(about line #154), change
map.logoVisible = true;
to
map.logoVisible = false;
0 Kudos