[Geomoose-users] GM2 and scale bar peculiarities
Johan Forsman
Johan.Forsman at LA.GOV
Thu Oct 8 10:22:04 EDT 2009
Hello All:
I have a rather confusing situation where the scale bar is not showing up on my maps.
Initially I presumed it was due to PEBCAK since that's typically the issue at my desk, but after closer inspection it turns out the scale bar is actually there, it's just drawn well outside the viewport! I can verify that the scalebar is drawn by using the URL to the scalebar directly, and I can verify that it is outside the viewport by panning the image. Click and drag up-and-right and the scalebar appears eventually, until I release the mouse button and the image is redrawn.
I reference the scalebar via its own mapfile that contains the following:
----------------------------------------------
MAP
NAME 'scalebar'
SIZE 800 650
STATUS ON
EXTENT 401488 3197075 909651 3653904
UNITS METERS
INCLUDE "../../geomoose_globals.map"
WEB
INCLUDE "../../temp_directory.map"
END
LEGEND
STATUS ON
LABEL
TYPE TRUETYPE
FONT arial
SIZE 8
COLOR 0 0 0
END
END
SCALEBAR
STATUS embed
POSITION ll
POSTLABELCACHE TRUE
COLOR 0 0 0
OUTLINECOLOR 166 202 240
TRANSPARENT off
UNITS miles
INTERVALS 4
SIZE 200 6
STYLE 0
LABEL
SIZE small
COLOR 0 0 0
ANTIALIAS TRUE
END #label
END #scalebar
END #Map
----------------------------------------------
In the above map file, if I omit the LEGEND block, the image returned is blank but there are no errors reported. Is this normal? Also, the scalebar STATUS must be EMBED or the image is blank.
In the mapbook I have the following mapsource defined:
<map-source name="scalebar" type="mapserver">
<file>./sdwp/base/scalebar.map</file>
<layer name="all"/>
</map-source>
And in the Catalog:
<layer title="Scalebar" src="scalebar/all" status="on"/>
All my mapfiles have the size set to 800x650, but the URL contains a much larger size spec (1401x954):
http://geoview/cgi-bin/mapserv.exe?map=%2Fms4w%2Fapps%2Fgeomoose2%2Fmaps%2Fsdwp%2Fbase%2Fscalebar.map&mode=map&layers=all&mapext=95374.46159638558+3044474.176204819+1215235.5384036144+3807034.823795181&imgext=95374.46159638558+3044474.176204819+1215235.5384036144+3807034.823795181&map_size=1401+954&imgx=700.5&imgy=477&imgxy=1401+954
Is the image-size difference the issue? If so, how can I correct it?
I have a feeling I am overlooking something embarrassingly simple.
Thanks for your consideration,
/Johan.
More information about the Geomoose-users
mailing list