[Geomoose-users] configuring scaleLine.js

Jim Klassen klassen.js at gmail.com
Fri Aug 7 12:22:39 PDT 2015


Here is the mapfile we use to generate a WMS scalebar layer for GeoMoose.

MAP
	NAME 'all'
        EXTENT 573387 162092 574211 162555
        STATUS ON
	UNITS FEET

	PROJECTION
		"init=epsg:200068"
	END

	TRANSPARENT TRUE
	IMAGETYPE PNG

	WEB
		...
	END

        SCALEBAR
                BACKGROUNDCOLOR 255 255 255
                IMAGECOLOR 255 255 255
                OUTLINECOLOR 0 0 0
                COLOR 0 0 0
                POSITION lr
                STATUS embed
                STYLE 0
                UNITS feet
        END

        LAYER
                NAME 'scalebar'
                STATUS ON
                TYPE ANNOTATION
        END
END

On Wed, Jul 29, 2015 at 02:29:38PM +0000, Bistrais, Bob wrote:
> Brent, Jim, thanks for the suggestions.
> 
> I've downloaded 2.4 from the site.  What code files do I find the scale_line object?  Will simply copying this line to my current version 2.6.1 work?
> 
> Jim- if you have a chance, can you elaborate on the contents of the mapfile for making the scale bar?
> 
> Thanks again,
> Bob
> 
> From: Brent Fraser [mailto:bfraser at geoanalytic.com]
> Sent: Tuesday, July 28, 2015 1:51 PM
> To: Bistrais, Bob; geomoose-users at lists.osgeo.org
> Subject: Re: [Geomoose-users] configuring scaleLine.js
> 
> Bob,
> 
>   As Jim points out, one approach is to use a mapserver layer to create an empty map with just a scale bar.  Another approach is to look at GeoMoose v2.4 and see where the scale_line object is used in the JavaScript.  It basically just configures the OpenLayers scalebar.  The advantage of this approach is that it can support the ground distance instead of just the map distance by including
> 
>     if(CONFIGURATION.scale_line.enabled) {
>         :            geodesic: true,
> 
> This difference can be significant depending on your map projection and where your are mapping.
> 
> 
> 
> Best Regards,
> 
> Brent Fraser
> On 7/28/2015 10:54 AM, Bistrais, Bob wrote:
> Thanks for the response, Brent.  I haven't found ScaleLine.js either.
> But then, how do I get a scale bar to appear?
> 
> From: Brent Fraser [mailto:bfraser at geoanalytic.com]
> Sent: Tuesday, July 28, 2015 12:36 PM
> To: Bistrais, Bob; geomoose-users at lists.osgeo.org<mailto:geomoose-users at lists.osgeo.org>
> Subject: Re: [Geomoose-users] configuring scaleLine.js
> 
> Bob,
> 
> Looks like the ScaleLine object was deprecated in v2.6 (http://www.geomoose.org/releases/2.6.html), and it was suggested to use the ScaleLine.js extension, which I never found (http://lists.osgeo.org/pipermail/geomoose-users/2013-April/004895.html)
> 
> 
> 
> 
> Best Regards,
> 
> Brent Fraser
> On 7/28/2015 9:43 AM, Bistrais, Bob wrote:
> Hello again,
> 
> Still looking for advice on how to get the scale line working on GeoMoose 2.6.x ?
> 
> From: geomoose-users-bounces at lists.osgeo.org<mailto:geomoose-users-bounces at lists.osgeo.org> [mailto:geomoose-users-bounces at lists.osgeo.org] On Behalf Of Bistrais, Bob
> Sent: Thursday, July 23, 2015 3:00 PM
> To: geomoose-users at lists.osgeo.org<mailto:geomoose-users at lists.osgeo.org>
> Subject: [Geomoose-users] configuring scaleLine.js
> 
> I am trying to enable a scale bar in GeoMoose 2.6.1.  I see that this is now handled through scaleLine.js.  I don't see any specific document on that, and I haven't found scaleLine.js in the code.  Can anyone point me to these?
> 
> Thanks,
> Bob
> 
> 
> 
> 
> 
> _______________________________________________
> 
> Geomoose-users mailing list
> 
> Geomoose-users at lists.osgeo.org<mailto:Geomoose-users at lists.osgeo.org>
> 
> http://lists.osgeo.org/mailman/listinfo/geomoose-users
> 
> 


More information about the Geomoose-users mailing list