2017-05-15 3 views
0

Ich bekomme gerade ein Problem beim Versuch, meine Karte mit GetMap Anfrage mit Mapserver anzuzeigen, aber es ein weißes Bild zurückgeben. Ich habe die Suche aber ich habe keine Antwort gefunden: Meine Map-Datei:GetMap Anfrage zurück weißes Bild

MAP 
    IMAGETYPE  PNG 
    EXTENT  -21 20 1 36 
    SIZE   700 400 
    IMAGECOLOR  255 255 255 
     PROJECTION 
     "init=epsg:4326" 
    END 
    OUTPUTFORMAT 
    NAME png 
    MIMETYPE image/png 
    DRIVER GD/PNG 
    EXTENSION png 
    IMAGEMODE PC256 
    TRANSPARENT FALSE 
    END 
    WEB 
    METADATA 
    "wms_title" "Dans Layers and Stuff" 
    "wms_onlineresource" "http://localhost:81/cgi-bin/mapserv.exe?" 
    "wms_enable_request" "*" 
    "wms_srs" "EPSG:4326" 
    "wms_feature_info_mime_type" "text/html" 
    "wms_format" "image/png" 
    END 
END 
LAYER 

NAME map1 
TYPE polygon 
STATUS default 
CONNECTIONTYPE postgis 
CONNECTION "dbname=postgres host=localhost port=5432 user=postgres" 
DATA "geom from comgeo" 
    PROJECTION 
     "init=epsg:4326" 
    END 
    METADATA 
    "wms_title" "map1" 
    END 
PROCESSING "SCALE=AUTO" 
CLASS 
    STYLE 
    COLOR 232 232 232 
    OUTLINECOLOR 32 32 32 
END 
END 
END 
END 

Und dieses ist die Verbindung ich für meine Anfrage verwendet:

http://localhost:81/cgi-bin/mapserv.exe?map=/wamp64/www/wordpress/map1.map&version=1.3.0&request=GetMap&CRS=EPSG:4326&bbox=-21,20,1,36&width=760&height=360&layers=map1&styles=&FORMAT=image/png&TRANSPARENT=TRUE 

Die BBox Werte korrekt sind. Vielen Dank enter image description here

Antwort

0

Ich habe die Probleme zu lösen, wenn ich epsg ersetzen: 4326 mit CRS: 84 und der URL:

http://localhost:81/cgi-bin/mapserv.exe?map=/wamp64/www/wordpress/map1.map&request=GetMap&SERVICE=WMS&version=1.3.0&CRS=CRS:84&bbox=-21,20,1,36&width=700&height=400&layers=map1&styles=&FORMAT=image/png&TRANSPARENT=TRUE 
+0

oder Sie könnten die Koordinatenreihenfolge in der BBOX ändern – user27874

1

Sie scheinen SERVICE = WMS-Parameter in Ihrer URL zu fehlen.

+0

ich das versucht, aber ich habe thesame Ergebnis: http: // localhost: 81/cgi-bin/mapserv.exe? map =/wamp64/www/wordpress/map1.map & anfrage = GetMap & SERVICE = WMS & version = 1.3.0 & CRS = EPSG: 4326 & bbox = -21,20,1,36 & width = 700 & höhe = 400 & layer = map1 & styles = & FORMAT = image/png & TRANSPARENT = TRUE –

+0

In der Datenbank, was diese Abfrage meldet "wählen Sie st_extents (geom) von comgeo –

+0

wählen Sie st_extent (geom) aus comgeo zurück: Box (-17 .... 20 ..... -1 ..... 35 .....) –