[mapserver-users] Mapserver layer + Openlayers = Random pink tiles...

Paul james pauljame at gmail.com
Thu May 28 11:05:16 EDT 2009


Hello guys...
I know It is a Openlayer question, but maybe someone here can help-me...


I did a simple sample to show my problem... My layer sometimes is 100%
showed, but when I zoom, several pink layers appears... Its absolute
RANDOM...

--> If I click right on the image, and get the image URL and PASTE on
browser, I CAN SEE THE IMAGE... So It was created fine...
Help? I´m getting crazy ...

ps.: Using Windows XP + IIS

Code:

Javascript :
var map, layer;

        function init() {
            map = new OpenLayers.Map('map', {
                numZoomLevels: 14,
                units: "meters",
                controls: [
                    new OpenLayers.Control.ZoomToMaxExtent(),
                    new OpenLayers.Control.PanZoomBar({ zoomWorldIcon: true
}),
                    new OpenLayers.Control.LayerSwitcher({ 'ascending':
false }),
                    new OpenLayers.Control.MousePosition(),
                    new OpenLayers.Control.MouseDefaults(),
                    new OpenLayers.Control.KeyboardDefaults()
                ]
            });
            OpenLayers.IMAGE_RELOAD_ATTEMPTS = 10;
            layer = new OpenLayers.Layer.MapServer("Sample", "
http://localhost/cgi-bin/mapserv.exe", { map: "C:/Sample/Openlayer/Map.map",
layers: "Test" });

            map.addLayer(layer);
            map.zoomToMaxExtent();


----

Mapfile

MAP
    EXTENT -79.7892 -34.2426 -24.9958 6.11775
    FONTSET "Fonts\Fonts.txt"
    IMAGECOLOR 230 254 254
    IMAGETYPE png
    SIZE 800 600
    STATUS ON
    UNITS dd
    NAME "Test"

    OUTPUTFORMAT
        NAME "png"
        MIMETYPE "image/png"
        DRIVER "GD/PNG"
        EXTENSION "png"
        IMAGEMODE "PC256"
        TRANSPARENT FALSE
    END

    PROJECTION
        'proj=longlat'
        'ellps=WGS84'
        'datum=WGS84'
        'no_defs'
    END

    WEB
        IMAGEPATH 'C:\map\temp'
        IMAGEURL '/tmp/'
        QUERYFORMAT text/html
        LEGENDFORMAT text/html
        BROWSEFORMAT text/html
    END

    QUERYMAP
        COLOR 255 0 0
        SIZE -1 -1
        STATUS ON
        STYLE hilite
    END

    REFERENCE
        EXTENT -79.7892 -34.2426 -24.9958 6.11775
        STATUS on
        SIZE 221 150
        MINBOXSIZE 5
        MAXBOXSIZE 150
        COLOR -1 -1 -1
        OUTLINECOLOR 255 0 0
        MARKERSIZE 8
    END

LAYER
        NAME Test
        GROUP "Tests"
        TYPE POLYGON
        STATUS default
        CONNECTIONTYPE POSTGIS
        CONNECTION "user=xpassword=xdbname=x host=x port=5432"
        DATA "the_geom from viwgeo_x USING UNIQUE oid USING SRID=-1"
        CLASS
            COLOR 255 0 255
        END
    END

END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090528/a63a01b7/attachment-0001.html


More information about the mapserver-users mailing list