Select to view content in your preferred language

I would like to hide the scalebar?

791
6
11-26-2010 06:58 AM
MiguelParedes
Esri Contributor
Why would I like to do this?  Because my map is a schematic.  A scale bar is senseless in this context, so I would like to hide it.
Is this just a setting within a configuration file?  Is it hidden away in the code, meaning that I would have to modified the viewer and recompile the code?

Any help would be greatly appreciated.
Miguel
Tags (2)
0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
Miguel,

   It is going to be in code. The viewer team did not make every little detail configurable.

So in the mapmanager you need to add
map.scaleBarVisible=false;
somewhere like in the if statement of the  protected override function partAdded.
0 Kudos
CoryHines
Deactivated User
Miguel, 

It is going to be in code. The viewer team did not make every little detail configurable. 

So in the mapmanager you need to add  
map.scaleBarVisible=false;
somewhere like in the if statement of the protected override function partAdded.


Supposedly with the release of version 2.2 they have added functionality to accomplish this, although they are incredibly vague on where in needs to go and the exact syntax.

More map settings are configurable: scalebarvisible to show or hide the scalebar, esrilogovisible to show or hide the Esri logo, and openhandcursorvisible to use or not the default open hand cursor.

I have attempted to put scalebarvisible="false" within the <map> tag in my config xml with no success. If you figure out how/where I'd be interested to know.

Thanks,
Cory
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Cory,

   Strange when I put
 scalebarvisible="false"
in the map element it works for me using FlexViewer 2.2...
0 Kudos
CoryHines
Deactivated User
Hi Robert,

I wonder what I'm doing incorrectly then.

This is what I have in my map element...

<map initialextent="5257024 3362447 5619424 3633113" top="55" scalebarvisible="false">

I've done a release build again after doing a clean and cleared my browser cache, but the scalebar is still there.

http://gis.linncounty.org/flexviewer/

Cory
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Cory,

   Look  in your ViewerContainer.mxml and verify what config file your app is using.
i.e:
public static const DEFAULT_CONFIG_FILE:String = "config-all.xml";

and make sure you are changing the right one.

I even opened a fresh version (unchanged) and tried to see if maybe I did something to fix that, but it worked fresh out of the box.
0 Kudos
CoryHines
Deactivated User
Got it now.

I was modifying the correct config file, but for some reason this change wasn't getting pushed forward.

Thanks for info Robert.

Cory
0 Kudos