[ka-Map-users] Turning off the scalebar

David Badke dbadke at uvic.ca
Fri Jan 20 17:01:15 EST 2006


I have tried hiding the scalebar div (div id="scaleReference" and its 
children), which does remove the scalebar, but for reasons unknown also 
kills the legend - it shows up as a blank gray box.

Anyway, my suggestion was actually to have the ability in the ka-Map 
core to turn off the scalebar and/or legend for individual maps, 
probably with a new element in the $aszMapFiles array. This would 
essentially replicate the map file SCALEBAR STATUS ON/OFF functionality.

I rather like the "sample interface" myself - it is a nice design - 
though I am modifying it. Actually, I am impressed with ka-Map overall!

David


Paul Spencer wrote:
> David, ka-map doesn't use mapserver's scalebar.  You could try hiding 
> the div that the scalebar is in.  Note that the app that ka-map comes 
> with is more in the way of a sample interface that one you should 
> really be relying on :)
>
> Cheers
>
> Paul
>
> On 20-Jan-06, at 2:12 PM, David Badke wrote:
>
>> In some of the maps I need to display, "scale" is meaningless to the 
>> viewer, so the displayed scalebar is not needed and is actually 
>> confusing. Using the CVS version of ka-Map, I want to turn the 
>> display of the scalebar off (actually the whole scalebar box), while 
>> keeping the legend visible. I tried setting the SCALEBAR status to 
>> OFF in the .map file, but that didn't work; as far as I can tell, the 
>> whole SCALEBAR section is ignored. I know I can modify the ka-Map 
>> code to remove the scalebar, but I would really rather not do that. A 
>> brief look through the code suggests that the whole "reference" 
>> section is meant to act as a group, with the only control of its 
>> visibility being through the toggle button.
>>
>> What I really want is for ka-Map to follow the SCALEBAR status 
>> setting in the .map file, or at least be able to turn the scalebar 
>> off for individual maps with a setting in the $aszMapFiles array. For 
>> the moment it is not a big issue, but I think ka-Map should have the 
>> ability to generate the scalebar or not, on a per-map basis. Same for 
>> the legend, independent of the scalebar (ie: be able to show both, 
>> either, or neither).
>>
>> If I get time, I may have a go at adding this functionality myself, 
>> but for the moment, consider this a suggestion for the suggestion box!
>>
>> David



More information about the ka-Map-users mailing list