[OpenLayers-Users] No imagery message tile like Google Maps

zenzero-2001 John.Westwood at port.ac.uk
Thu May 8 09:47:41 EDT 2008


I got it to work using the MapServer method, after I removed the "BACKGROUND"
command. However, because I have a large tilecache buffer the text does not
appear on every tile.

I would rather get it to work the other way, thus bypassing tilecache. But
to do this I need MapServer to generate an exception when a map is requested
at an unsupported scale.

Thanks for your suggestion.



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

-- 
View this message in context: http://www.nabble.com/No-imagery-message-tile-like-Google-Maps-tp17105133p17125305.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list