[Geomoose-users] Scalebar in GM2

Len Kne lkne at houstoneng.com
Thu Aug 20 09:42:48 EDT 2009


I think adding this to the mapbook will work:

<param name="scale_line.top_units"></param>

More info on OL scalelines
http://n2.nabble.com/ScaleLine-km-only-td1828310.html#a16717688

Len

-----Original Message-----
From: CoFIS Web [mailto:coffee at uni-bonn.de] 
Sent: Thursday, August 20, 2009 7:06 AM
To: Len Kne
Cc: GeoMoose Mailing list
Subject: Re: [Geomoose-users] Scalebar in GM2

Len,
Thanks for the notice. I use the OL code and it works fine.

A question to the list:
Is it possible to have either the top or bottom scale line enabled 
exclusively? I would only need to show kilometers, since I am working 
with small scale maps.

Thanks,
Nils

Len Kne schrieb:
> Not sure if this would help, but it is also possible to get the scale line drawn through OpenLayers.  I see the latest version on the SVN trunk includes the code to do this.
> 
> Len
> 
> -----Original Message-----
> From: CoFIS Web [mailto:coffee at uni-bonn.de] 
> Sent: Wednesday, August 19, 2009 12:33 PM
> To: Dan Little
> Cc: GeoMoose Mailing list
> Subject: Re: [Geomoose-users] Scalebar in GM2
> 
> The learning by doing approach ;-) thanks.
> 
> I put MAP .. END around the whole thing and it works when being called 
> directly via URL - but still no scalebar in GM. The scalebar mapfile 
> referenced in the mapbook now looks like:
> 
> MAP
>   TRANSPARENT  true
> 
>   OUTPUTFORMAT
>    NAME  'agg/png'
>    DRIVER  'agg/png'
>    MIMETYPE  'image/png'
>    IMAGEMODE  'rgba'
>    EXTENSION  'png'
>    FORMATOPTION  'TRANSPARENT=TRUE'
>   END  # OUTPUTFORMAT
> 	
>   IMAGETYPE  'agg/png'
>   IMAGECOLOR  255 255 255
> 	
>   SCALEBAR
>    INTERVALS  5
>    UNITS  kilometers
>    STATUS  embed
>    POSTLABELCACHE  true
>    POSITION  ul
>    OUTLINECOLOR  0 0 0
>    BACKGROUNDCOLOR  255 255 255
> 
>    STYLE  0
> 
>    LABEL
>      COLOR  0 0 0
>      OUTLINECOLOR  255 255 255
>      SIZE  medium
>    END  #LABEL
>   END  # SCALEBAR
> END  # MAP
> 
> And second, how to make the scalebar entry disappear from the layer catalog?
> 
> Thanks,
> Nils
> 
> 
> Dan Little schrieb:
>> In Firefox, go to "Tools" -> "Page Info" and click on the "Media" tab (or the German equivalents).
>>
>> Scroll down to where you see the URL for the scale bar request.  Copy the URL and open it up in a new tab/window.  It should show a MapServer error.  Address the mapserver error and everything should work properly. :)
>>
>>
>>
>> ----- Original Message ----
>>> From: CoFIS Web <coffee at uni-bonn.de>
>>> To: GeoMoose Mailing list <geomoose-users at lists.sourceforge.net>
>>> Sent: Wednesday, August 19, 2009 11:15:23 AM
>>> Subject: [Geomoose-users] Scalebar in GM2
>>>
>>> Dear all,
>>> which would be the place to enable a global scalebar in GM2?
>>>
>>> I tried including a mapfile in my mapbook with
>>>
>>>
>>>     ./defaults/scalebar.map
>>>     
>>>
>>>
>>> and in the catalog
>>>
>>>
>>>
>>> But that does not seem to work (pink background in GM).
>>> The following scalebar.map works if I include it into a mapfile and call 
>>> that mapfile directly via URL:
>>>
>>> SCALEBAR
>>>   INTERVALS  4
>>>   STATUS  embed
>>>
>>>   STYLE  0
>>>    OUTLINECOLOR  0 0 0
>>>    POSITION  ll
>>>    UNITS  kilometers
>>>    BACKGROUNDCOLOR  255 255 255
>>>
>>>     LABEL
>>>      COLOR  0 0 0
>>>      OUTLINECOLOR  255 255 255
>>>      SIZE  medium
>>>     END #LABEL
>>> END # SCALEBAR
>>>
>>> Any suggestions? Thanks,
>>> Nils
>>> -- 
>>> Center for Development Research
>>> Department of Ecology and Resource Management
>>>
>>> Walter-Flex-Strasse 3
>>> 53113 Bonn (Germany)
>>>
>>> Tel.:   +49 (0) 228 - 73-1793
>>> FAX:    +49 (0) 228 - 73-1889
>>>
>>> E-Mail: coffee at uni-bonn.de
>>>
>>> Web:    http://www.cofis.info/atlas
>>>          http://www.coffee.uni-bonn.de
>>>
>>> ------------------------------------------------------------------------------
>>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
>>> trial. Simplify your report design, integration and deployment - and focus on 
>>> what you do best, core application coding. Discover what's new with 
>>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>> _______________________________________________
>>> Geomoose-users mailing list
>>> Geomoose-users at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geomoose-users
>>
>>
>>       
> 

-- 
Center for Development Research
Department of Ecology and Resource Management

Walter-Flex-Strasse 3
53113 Bonn (Germany)

Tel.:   +49 (0) 228 - 73-1793
FAX:    +49 (0) 228 - 73-1889

E-Mail: coffee at uni-bonn.de

Web:    http://www.cofis.info/atlas
         http://www.coffee.uni-bonn.de




More information about the Geomoose-users mailing list