Show
Ignore:
Timestamp:
03/02/10 06:26:55 (2 years ago)
Author:
cmoullet
Message:

Add webservice

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • sandbox/camptocamp/mapfish_workshop_fossgis2010/printing_src/_build/html/creating_webservice.html

    r3379 r3382  
    7070<div class="highlight-python"><pre>CREATE DATABASE mapfish_workshop TEMPLATE=template_postgis;</pre> 
    7171</div> 
    72 <p>Then, open the explorer, go into the <tt class="docutils literal"><span class="pre">C:\MapFish\mapfish_workshop\data</span></tt> 
     72<p>Then, open the explorer, go into the <tt class="docutils literal"><span class="pre">/home/live/mapfish/mapfish_workshop_fossgis2010/data</span></tt> 
    7373folder and extract the <tt class="docutils literal"><span class="pre">countries.zip</span></tt> file. And enter the following commands 
    7474to import the <tt class="docutils literal"><span class="pre">countries</span></tt> Shapefile as a table named <tt class="docutils literal"><span class="pre">countries</span></tt> in the 
    7575<tt class="docutils literal"><span class="pre">mapfish_workshop</span></tt> database:</p> 
    76 <div class="highlight-python"><pre>C:\MapFish&gt;cd mapfish_workshop\data 
    77 C:\MapFish\mapfish_workshop\data&gt;"C:\Program Files\PostgreSQL\8.3\bin\shp2pgsql.exe" -s 4326 -I countries.shp countries | "C:\Program Files\PostgreSQL\8.3\bin\psql.exe" -d mapfish_workshop -U postgres</pre> 
     76<div class="highlight-python"><pre>cd /home/live/mapfish/mapfish_workshop_fossgis2010/data 
     77~mapfish/mapfish_workshop_fossgis2010/data$ shp2pgsql -s 4326 -I countries.shp countries | psql -d mapfish_workshop -U postgres</pre> 
    7878</div> 
    7979<p>You can start pgAdmin and connect to the <tt class="docutils literal"><span class="pre">mapfish_workshop</span></tt> database to check 
     
    116116</li> 
    117117<li><p class="first">generate the web service code with the <tt class="docutils literal"><span class="pre">mf-layer</span></tt> command:</p> 
    118 <div class="highlight-python"><pre>&lt;env&gt; C:\MapFish\MapFishApp&gt;paster mf-layer countries</pre> 
     118<div class="highlight-python"><pre>&lt;env&gt; ~mapfish/MapFishApp&gt;paster mf-layer countries</pre> 
    119119</div> 
    120120</li> 
     
    130130<p>If you killed <tt class="docutils literal"><span class="pre">paster</span> <span class="pre">serve</span></tt> or if you did not add the <tt class="docutils literal"><span class="pre">--reload</span></tt> switch, 
    131131restart <tt class="docutils literal"><span class="pre">MapFishApp</span></tt> with:</p> 
    132 <div class="highlight-python"><pre>&lt;env&gt; C:\MapFish\MapFishApp&gt;paster serve --reload development.ini</pre> 
     132<div class="highlight-python"><pre>&lt;env&gt; ~mapfish/MapFishApp&gt;paster serve --reload development.ini</pre> 
    133133</div> 
    134134<p>You can now open <a class="reference external" href="http://localhost:5000/countries?limit=1">http://localhost:5000/countries?limit=1</a> in your browser, you