Dane,

I tested adding __all__ as my layer which worked!  See below!

    <script src="http://openlayers.org/api/OpenLayers.js";></script>
    <script type="text/javascript">
      var map, wms, xy;

        function init(){
            map = new OpenLayers.Map('map',{numZoomLevels: 21});

            var url = "http://localhost:8000/?";;

            wms = new OpenLayers.Layer.WMS("Mapnik WMS",url,
                {layers: ['__all__'], styles:[''],format:'image/png'}
                );

            map.addLayers([wms]);

            map.fractionalZoom = true;
            map.zoomToMaxExtent();
        }
    </script>

When I updated to the version of OGCServer listed here (
http://bitbucket.org/springmeyer/ogcserver/get/2a39e0f7d2e9.zip) I get the
following error.

OGCException Unsupported service "WMS" where each of my tiles should be. An
example URL is as follows.
http://localhost:8000/?LAYERS=__all__&STYLES=&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-100.68846815835,-90,-21.376936316695,-10.688468158348&WIDTH=256&HEIGHT=256

When I go back to an older version, everything appears to be working just
fine. Do you have any suggestions on this one?

Adam


On Mon, Mar 22, 2010 at 9:37 PM, Dane Springmeyer <[email protected]>wrote:

>
>
> --- \o/ ---
> Sent from my phone
>
> On Mar 22, 2010, at 1:04 PM, Adam Estrada <[email protected]> wrote:
>
> All,
>
> I am having the damnedest time getting OGCServer up and running on my
> Windows server.
>
>
> Maybe then get things running on Linux first?
>
> Here's what I've got so far.
>
> *cgi-bin/wms.py*
>
> #!/usr/bin/env python -u
>
>
> That shebang line can't work on windows can it?
>
> import sys
> from mapnik.ogcserver.wsgi import WSGIApp
> # from mapnik.ogcserver.modserver import ModHandler
> sys.path.append('C:/Program Files (x86)/Apache/cgi-bin')
>
> # application = ModHandler('C:/Program Files
> (x86)/Apache/cgi-bin/ogcserver.conf')
> application = WSGIApp('C:/Program Files
> (x86)/Apache/cgi-bin/ogcserver.conf')
>
> if __name__ == '__main__':
>     from wsgiref.simple_server import make_server
>     httpd = make_server('localhost', 8000, application)
>     print "Listening on port 8000...."
>     httpd.serve_forever()
>
> *cgi-bin/map_factory.py*
>
> #!/usr/bin/env python -u
>
> from mapnik.ogcserver.WMS import BaseWMSFactory
>
> class WMSFactory(BaseWMSFactory):
>   def __init__(self):
>     BaseWMSFactory.__init__(self)
>     self.loadXML('C:/Program Files (x86)/Apache/cgi-bin/osm.xml')
>     self.finalize()
>
>
> Normally you would only put your 'wms.py' script in the cgi-bin, not
> anything else. Also you'd only put 'wms.py' in cgi bin if it were actually
> being deployed as cgi. In this case it looks like you are embedding in
> apache through mod_wsgi or _mod_python so you can just put it in any web
> accessible directory and point mod_wsgi/mod_python at it.
>
>
> *cgi-bin/ogcserver.conf*
>
> # module:  The module containing the MapFactory class.  See the readme for
> #          details.
> # This would be the name of the map_factory file (without extension .py)
>
> module=map_factory
>
> There is a lot more in the .conf file but you get the idea...
>
> My goal here is to serve up my own OSM tiles using ogcserver but when I
> view the data in OpenLayers 
> (<http://localhost:8000/?LAYERS=osm&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=90,0,180,90&WIDTH=256&HEIGHT=256>
> http://localhost:8000/?LAYERS=osm&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=90,0,180,90&WIDTH=256&HEIGHT=256)
> I get the following error in my XML response.
>
>
> What is that 'osm' layer? How is that going to work? The layers list must
> correspond to the layer names in the XML file or be set to __all__ to
> request them all as one map.
>
> Put debug=true in your config to get HTML error response. Might help since
>  your ol request is asking for image error which is odd if your are getting
> an XML parsing error as per below.
>
>
> XML Parsing Error: no element found Location:
> moz-nullprincipal:{7c4d5cef-42fc-4fe8-a12e-82b7e6256b36} Line Number 1,
> Column 1:
>
>
> Very odd, that one.
>
> In QGIS, I am able to pass in the url ( <http://localhost:8000>
> http://localhost:8000) which gives me the entire list of the OSM data (via
> GetCapabilities) I have stored in Postgres/PostGIS.When I finalize the WMS
> setup in QGIS, I get an error with no values at all so it's hard to debug in
> that environment.
>
>
> Run the server as wsgi standalone and you can see the request coming in.
> Grab it and paste into a browser. To learn more.
>
> I am also able to get the Capabilities list from my mini-WMS in ArcGIS, but
> not data is being returned. Can anyone suggest what I may be doing wrong
> here? I am using the latest and greatest version of everything so I really
> don't know what might be messing up.
>
>
> Capabilies depend on lxml being installed. Also I'd recommend using the
> ogcserver code from bitbucket that I told you about earlier as a variety of
> subtle things are fixed in terms of capabilities compatability with ESRI
> clients.
>
> Thanks in advance,
> Adam
>
>
>
>
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users
>
>
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to