a bit more on this below --

On Sep 22, 2011, at 9:17 PM, Puneet Kishor wrote:

> I am unable to figure this out --
> 
> My app front is Google Maps API v3 with MapServer 6.0.1
> 
> $./mapserv -v
> MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
> SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER 
> SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE
> 
> The app fires WMS requests that look like so in Firebug and Safari Web 
> Inspector (one per tile)
> 
> http://path/to/server/cgi-bin/app?version=1.1.1&request=GetMap&format=image/png&TRANSPARENT=TRUE&Styles=&SRS=EPSG:4326&Layers=lyr&width=256&height=256&BBOX=-135,40.97989806962013,-90,66.51326044311185
> 
> The status code in Firebug is "Aborted" ("Canceled" in Safari Web Inspector). 
> The ms_error file kicks in the following messages --
> 
> [Thu Sep 22 21:00:55 2011].347078 msWMSLoadGetMapParams(): enabling 
> non-square pixels.
> [Thu Sep 22 21:00:55 2011].347608 msDrawMap(): kicking into non-square pixel 
> preserving mode.
> [Thu Sep 22 21:00:55 2011].347615 msDrawMap(): rendering using outputformat 
> named png24 (AGG/PNG).
> 
> My .map file has the following incantation --
> 
>        #### in the MAP section #####
>       PROJECTION
>         "init=epsg:4326"
>       END
>       WEB
>         METADATA
>           ows_enable_request "*"
>            wms_abstract "blah blah"
>            wms_accessconstraints "none"
>            wms_title "gpsvecs"
>            wms_onlineresource "http://path/to/server/cgi-bin/gpsvecs?";
>            wms_srs "EPSG:4326"
>            wms_keywordlist "foo,bar"
>            wms_enable_request "*"
>         END
>       END
> 
>        #### in the LAYER section ####
>       LAYER
>         NAME "lyr"
>          CONNECTION "host=localhost port=5432 dbname=db user=user 
> password=passwd"
>          CONNECTIONTYPE POSTGIS
>          PROCESSING "CLOSE_CONNECTION=DEFER"
>          DATA "the_geom FROM (SELECT gid, a, b, the_geom FROM table) foo 
> USING UNIQUE gid USING srid=4326"
> 
>         PROJECTION
>           "init=epsg:4326"
>         END
>       
>         METADATA
>           wms_srs   "EPSG:4326"
>           wms_title "lyr"
>            wms_abstract "blah blah"
>            wms_keywordlist "foo,bar"
>            wms_enable_request "*"
>            wms_extent "-180 -90 180 90"
>         END
> 
> 
> Suggestions?


Seems like when fired by Google Maps, MapServer doesn't return any Response 
Headers. If I take the same query and send it manually, I get the response 
headers, and I get a nice image back. Any idea what is going on? My guess is I 
am doing something wrong on the Gmaps side. Here is my relevant code

        var lyr = new google.maps.ImageMapType({
                "getTileUrl" : function (tile, zoom) {
                        return uri + "layers=" + name + 
"&mode=tile&tilemode=gmap&tile=" + tile.x + "+" + tile.y + "+" + zoom;
                },
                "tileSize"  : new google.maps.Size(256, 256),
                "isPng"     : false,
                "opacity"   : 0.5,
                "maxZoom"   : 22,
                "minZoom"   : 1,
                "alt"       : "",
                "name"      : name
        });
        
        
map.overlayMapTypes.push(lyr)_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to