[OpenLayers-Users] No imagery message tile like Google Maps
Paul Spencer
pagameba at gmail.com
Wed May 7 12:47:19 EDT 2008
Since you are hitting mapserver anyway to generate the error message,
you might as well have it generate the no data tile:
LAYER
NAME "nodata"
STATUS ON
TYPE ANNOTATION
TRANSFORM FALSE # feature is in pixel space, not geographic space
FEATURE
POINTS
128 128 # middle of a 256x256 tile draw
END
TEXT "No Data Available"
END
CLASS
MINSCALE 1
MAXSCALE 20000 # below this scale, there is no data
LABEL
FONT "arial" #defined in fonts.txt
TYPE TRUETYPE
SIZE 8
BUFFER 1
COLOR 0 0 0
BACKGROUND 255 255 255
FORCE TRUE
END
END
END
(adapted from http://mapserver.gis.umn.edu/docs/faq/copyright-layer)
Cheers
Paul
On 7-May-08, at 12:30 PM, zenzero-2001 wrote:
>
> Hi,
>
> I couldn't get it to work. But I know why. It is because the
> MapServer WMS
> is not returning an error, it always returns a valid map, even it is
> just
> blank.
>
> So I need to make certain scales invalid so that when a WMS request
> is made
> for a scale that is not supported it returns an error instead of
> blankness.
> I've had a look at the WMS information on the MapServer website and
> I can't
> see how to do this. There is "wms_extent" for defining the bounding
> box, but
> nothing for scales.
>
> Thanks.
> --
> View this message in context: http://www.nabble.com/No-imagery-message-tile-like-Google-Maps-tp17105133p17109121.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
More information about the Users
mailing list