[mapserver-users] How to configure mapserver as a tile server?

Hishan Melanga hishanm at gmail.com
Sat May 25 20:08:36 PDT 2013


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.


On Sat, May 25, 2013 at 7:47 PM, Stephen Woodbridge <woodbri at swoodbridge.com
> 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 <hishanm at gmail.com
>> <mailto:hishanm at gmail.com>> 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
>>     <woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.**com<woodbri at swoodbridge.com>>>
>> 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.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
>>         mapserver-users at lists.osgeo.__**org
>>         <mailto:mapserver-users at lists.**osgeo.org<mapserver-users at lists.osgeo.org>
>> >
>>         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
>> mapserver-users at lists.osgeo.**org <mapserver-users at lists.osgeo.org>
>> http://lists.osgeo.org/**mailman/listinfo/mapserver-**users<http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>>
>>
> ______________________________**_________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.**org <mapserver-users at lists.osgeo.org>
> http://lists.osgeo.org/**mailman/listinfo/mapserver-**users<http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>



-- 
හිෂාන් මෙලංග | Hishan Melanga <http://hishanmelanga.blogspot.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130526/7da323f8/attachment.htm>


More information about the MapServer-users mailing list