On 5/25/2013 11:08 PM, Hishan Melanga wrote:
What is the link to access the tiles in web browser if I used your .xml
as the configuration? Is it still http://example.com/mapcache/demo or
something else.

You would replace example.com with your host name.

Also note the blue (+] buttom in the upper right of the demo map page, open this is you have multiple services or tilesets defined and you can select that one you want to view.

Here is my demo page that has data for the US and is pulling tiles from my mapcache instance.

http://imaptools.com:8080/demo/tiger-demo2.html

-Steve


On Sat, May 25, 2013 at 7:47 PM, Stephen Woodbridge
<[email protected] <mailto:[email protected]>> wrote:

    So the way this works is:

    browser <----> mapcache <----> mapserver_wms

    So look at the demo page if you have mapcache.xml configured then
    you should see a simple OpenLayers application that pulls tiles from
    mapcache.

    your mapcache.xml needs look something like this. The referrences in
    the source block are explicit references to names in my mapfile.
    Obviously parameter values need to be change for your server and
    mapfile.

    -Steve

    <?xml version="1.0" encoding="UTF-8"?>
    <mapcache>
       <metadata>
         <title>iMaptools mapcache service</title>
         <abstract>Contains various services for iMaptools maps</abstract>
       </metadata>

       <cache name="disk" type="disk">
         <base>/u/mapcache</base>
         <symlink_blank/>
       </cache>

       <source name="tiger2011" type="wms">
         <getmap>
           <params>
             <FORMAT>image/png</FORMAT>
             <MAP_IMAGETYPE>agg_qn</MAP___IMAGETYPE>
             <LAYERS>Tiger_2011</LAYERS>
             <MAP>/u/data/tiger2011-maps/__tiger2011-mc.map</MAP>
           </params>
         </getmap>

         <http>
           <url>http://localhost/cgi-bin/__mapserv-60
    <http://localhost/cgi-bin/mapserv-60></url>
         </http>
       </source>

       <format name="PNGQ_FAST" type="PNG">
         <compression>fast</__compression>
         <colors>256</colors>
       </format>

       <tileset name="tiger-base">
         <source>tiger2011</source>
         <cache>disk</cache>
         <grid>WGS84</grid>
         <grid>g</grid>
         <format>PNGQ_FAST</format>
         <metatile>5 5</metatile>
         <!-- metabuffer must be the abs() of what is in the mapfile -->
         <metabuffer>20</metabuffer>
         <expires>3600</expires>
       </tileset>

       <default_format>PNGQ_FAST</__default_format>

       <service type="wms" enabled="true">
         <full_wms>assemble</full_wms>
         <resample_mode>bilinear</__resample_mode>
         <format>PNGQ_FAST</format>
         <maxsize>4096</maxsize>
       </service>
       <service type="wmts" enabled="true"/>
       <service type="tms" enabled="true"/>
       <service type="kml" enabled="true"/>
       <service type="gmaps" enabled="true"/>
       <service type="ve" enabled="true"/>
       <service type="demo" enabled="true"/>

       <errors>report</errors>
       <lock_dir>/tmp</lock_dir>

    </mapcache>



    On 5/25/2013 9:47 AM, Hishan Melanga wrote:

        ok. Now I have http://example.com/mapcache/__demo
        <http://example.com/mapcache/demo> working. But how can I
        get my mapserver's wms connect to it.


        On Sat, May 25, 2013 at 10:42 AM, Hishan Melanga
        <[email protected] <mailto:[email protected]>
        <mailto:[email protected] <mailto:[email protected]>>> wrote:

             Thanks. I installed mapcahe and started to learn about the xml
             configuration file. Reading
        http://mapserver.org/mapcache/__config.html
        <http://mapserver.org/mapcache/config.html> as a start. Hope it
        is the
             first thing that I should do.


             On Sat, May 25, 2013 at 8:07 AM, Stephen Woodbridge
             <[email protected] <mailto:[email protected]>
        <mailto:woodbri@swoodbridge.__com
        <mailto:[email protected]>>> wrote:

                 On 5/24/2013 10:06 PM, Hishan Melanga wrote:

                     I have a working mapserver and I can view my map using
        
http://localhost/cgi-bin/____mapserv?map=/path/to/map&mode=____browse&template=openlayers&____layers=all
        
<http://localhost/cgi-bin/__mapserv?map=/path/to/map&mode=__browse&template=openlayers&__layers=all>

        
<http://localhost/cgi-bin/__mapserv?map=/path/to/map&mode=__browse&template=openlayers&__layers=all
        
<http://localhost/cgi-bin/mapserv?map=/path/to/map&mode=browse&template=openlayers&layers=all>>.

                     Now I want to give out those data to public as
        tiles giving
                     a single URL
                     such as tile.myserver.org
        <http://tile.myserver.org> <http://tile.myserver.org>

                     <http://tile.myproxy.org/>. How can I achieve

                     this using Mapserver? What is the place to start? What
                     tutorials I have
                     to read? I've read that Mapserver has a tile mode
                     <http://mapserver.org/output/____tile_mode.html
        <http://mapserver.org/output/__tile_mode.html>

                     <http://mapserver.org/output/__tile_mode.html
        <http://mapserver.org/output/tile_mode.html>>>.
                     Thanks in advance.


                 mapcache it the tile server for mapserver. So you will
        want to
                 look at that. The basic scenario is this:

                 1. setup mapserver as a WMS server
                 2. build and install mapcache as an apache module
                 3. setup a mapcache.xml to describe you WMS server, and
        your cache.
                     make sure you configure the demo service initially
        for testing
                     you can disable it later if you want
                 4. restart apache
                 5. http://example.com/mapcache/____demo
        <http://example.com/mapcache/__demo>

                 <http://example.com/mapcache/__demo
        <http://example.com/mapcache/demo>>

                 whenever you change your mapcache.xml you need to start
        apache
                 so it reads your changes.

                 -Steve W
                 ___________________________________________________
                 mapserver-users mailing list
                 [email protected].____org
                 <mailto:mapserver-users@lists.__osgeo.org
        <mailto:[email protected]>>
        http://lists.osgeo.org/____mailman/listinfo/mapserver-____users
        <http://lists.osgeo.org/__mailman/listinfo/mapserver-__users>

        <http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
        <http://lists.osgeo.org/mailman/listinfo/mapserver-users>>




             --
             හිෂාන් මෙලංග | Hishan Melanga
        <http://hishanmelanga.__blogspot.com/
        <http://hishanmelanga.blogspot.com/>>




        --
        හිෂාන් මෙලංග | Hishan Melanga
        <http://hishanmelanga.__blogspot.com/
        <http://hishanmelanga.blogspot.com/>>



        _________________________________________________
        mapserver-users mailing list
        [email protected].__org
        <mailto:[email protected]>
        http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
        <http://lists.osgeo.org/mailman/listinfo/mapserver-users>


    _________________________________________________
    mapserver-users mailing list
    [email protected].__org
    <mailto:[email protected]>
    http://lists.osgeo.org/__mailman/listinfo/mapserver-__users
    <http://lists.osgeo.org/mailman/listinfo/mapserver-users>




--
හිෂාන් මෙලංග | Hishan Melanga <http://hishanmelanga.blogspot.com/>


_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users


_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to