[mapserver-users] Map Not Available at This Scale Image

Donald Kerr donald.kerr at dkerr.co.uk
Sun Jun 17 03:55:00 PDT 2012


Folks,

Now solved. It was actually quite easy for my set up using the advice
provided by you all over the last few days and some further searching.

I've created a layer that's first to be rendered and is always on with the
label being drawn immediately (LABELCACHE OFF). The label is always
overwritten by other layers where data is available. When no data is
available, the label shows.

Layer code below:

# ------------------------------------------
LAYER
	NAME "NoCoverage"
	STATUS DEFAULT
	TYPE ANNOTATION
	LABELCACHE OFF
	TRANSFORM CC
	UNITS PIXELS
	FEATURE
		POINTS
			0 0
		END
		TEXT "Sorry|No map coverage|available here"
	END
	CLASS
		LABEL
			FONT "arial"
			TYPE TRUETYPE
			SIZE 8
			COLOR 0 0 0
			FORCE TRUE
			ALIGN CENTER
			WRAP "|"
		END # LABEL
	END # CLASS
END # LAYER
# ------------------------------------------

Many thanks.

Regards,

Donald



-----Original Message-----
From: Lime, Steve D (DNR) [mailto:Steve.Lime at state.mn.us] 
Sent: 14 June 2012 23:16
To: Donald Kerr; 'MAPSERVER USERS'
Subject: RE: [mapserver-users] Map Not Available at This Scale Image


Why not a layer with STATUS DEFAULT but a MAXSCALE value that kicks in when
your other data runs out?
 
From: Donald Kerr [mailto:donald.kerr at dkerr.co.uk] 
Sent: Thursday, June 14, 2012 4:07 PM
To: Lime, Steve D (DNR); 'MAPSERVER USERS'
Subject: RE: [mapserver-users] Map Not Available at This Scale Image
 
Steve,
 
I don't think that any of those options will work for me. I have fifteen
zoom levels and the map coverage is complete except for three. Those three
are a made up of an image returned after querying PostGIS so a blank image
is effectively created since there are no points, lines or polygons returned
from the PostGIS query at that zoom level i.e. to all intents and purposes,
a valid map is returned except that there's noting in it. It's these
particular zoom levels where I am trying to display the "no coverage'
message. I had thought that it may be possible to create a permanent layer
that's always there under all the layers and is effectively overwritten by
any drawn layers above except where there's no data. I'm thinking now that
this may not be possible. 
 
Many thanks.
 
Regards,
 
Donald
-----Original Message-----
From: Lime, Steve D (DNR) [mailto:Steve.Lime at state.mn.us] 
Sent: 14 June 2012 21:54
To: Donald Kerr; 'MAPSERVER USERS'
Subject: RE: [mapserver-users] Map Not Available at This Scale Image Couple
of options.
 
1)      You can create a layer that displays that text in the middle of the
map and have it turn on below a certain scale. If doing tiling w/meta-tiling
you'd want draw the text the same number of times as you have meta-tiles.
That would take some mucking about but it's doable.
2)      There's a little used parameter in the WEB section called
MINTEMPATE/MAXTEMPLATE. MapServer will redirect to the URL specified
depending on scale. It's been ages since I used it but in theory you could
reference an image with the necessary text by URL.
 
Steve
 
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Donald Kerr
Sent: Thursday, June 14, 2012 1:42 PM
To: 'MAPSERVER USERS'
Subject: [mapserver-users] Map Not Available at This Scale Image
 
Hi list,
 
I have a number of layers that are on or off depending on the zoom level and
some of those layers do not have coverage in certain areas. The question is,
is there a way to display a map image saying something along the lines of,
"Map not available at this level"?
 
I think I have read somewhere that it can be done in a round about way but I
cannot find any information after having a good internet trawl.
 
Many thanks.
 
Regards,
 
Donald
 




More information about the MapServer-users mailing list